@specforge/cli 0.1.0 → 0.2.5

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 (648) hide show
  1. package/dist/cli/commands/debug/register.js +1 -1
  2. package/dist/cli/commands/debug/register.js.map +1 -1
  3. package/dist/cli/commands/debug/types.d.ts.map +1 -1
  4. package/dist/cli/commands/debug/types.js +4 -2
  5. package/dist/cli/commands/debug/types.js.map +1 -1
  6. package/dist/cli/commands/init.types.d.ts +4 -4
  7. package/dist/cli/commands/init.types.d.ts.map +1 -1
  8. package/dist/cli/commands/init.types.js.map +1 -1
  9. package/dist/cli/commands/scaffold/agent-types.js +1 -1
  10. package/dist/cli/commands/scaffold/agent-types.js.map +1 -1
  11. package/dist/cli/config/agent-teams.types.d.ts +35 -12
  12. package/dist/cli/config/agent-teams.types.d.ts.map +1 -1
  13. package/dist/cli/config/agent-teams.types.js.map +1 -1
  14. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts +21 -3
  15. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts.map +1 -1
  16. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js +114 -48
  17. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js.map +1 -1
  18. package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts.map +1 -1
  19. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js +124 -83
  20. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js.map +1 -1
  21. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts +22 -3
  22. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts.map +1 -1
  23. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js +225 -160
  24. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js.map +1 -1
  25. package/dist/cli/templates/agents/content/core/sfag-work-resolver.d.ts +16 -0
  26. package/dist/cli/templates/agents/content/core/sfag-work-resolver.d.ts.map +1 -0
  27. package/dist/cli/templates/agents/content/core/sfag-work-resolver.js +199 -0
  28. package/dist/cli/templates/agents/content/core/sfag-work-resolver.js.map +1 -0
  29. package/dist/cli/templates/agents/index.d.ts.map +1 -1
  30. package/dist/cli/templates/agents/index.js +2 -0
  31. package/dist/cli/templates/agents/index.js.map +1 -1
  32. package/dist/cli/templates/content/sf-commit.d.ts +1 -1
  33. package/dist/cli/templates/content/sf-commit.d.ts.map +1 -1
  34. package/dist/cli/templates/content/sf-commit.js +2 -2
  35. package/dist/cli/templates/content/sf-commit.js.map +1 -1
  36. package/dist/cli/templates/content/sf-reset.d.ts +5 -2
  37. package/dist/cli/templates/content/sf-reset.d.ts.map +1 -1
  38. package/dist/cli/templates/content/sf-reset.js +41 -27
  39. package/dist/cli/templates/content/sf-reset.js.map +1 -1
  40. package/dist/lib/prompt-generator.d.ts +15 -3
  41. package/dist/lib/prompt-generator.d.ts.map +1 -1
  42. package/dist/lib/prompt-generator.js +14 -6
  43. package/dist/lib/prompt-generator.js.map +1 -1
  44. package/dist/lib/workflow-definitions.js +2 -2
  45. package/dist/lib/workflow-definitions.js.map +1 -1
  46. package/dist/server.d.ts.map +1 -1
  47. package/dist/server.js +2 -1
  48. package/dist/server.js.map +1 -1
  49. package/dist/tools/__tests__/complete-planning-double-call.test.d.ts +2 -0
  50. package/dist/tools/__tests__/complete-planning-double-call.test.d.ts.map +1 -0
  51. package/dist/tools/core/__tests__/file-existence-injection.test.d.ts +2 -0
  52. package/dist/tools/core/__tests__/file-existence-injection.test.d.ts.map +1 -0
  53. package/dist/tools/core/__tests__/git-injection.test.d.ts +2 -0
  54. package/dist/tools/core/__tests__/git-injection.test.d.ts.map +1 -0
  55. package/dist/tools/core/file-existence-injection.d.ts +22 -0
  56. package/dist/tools/core/file-existence-injection.d.ts.map +1 -0
  57. package/dist/tools/core/file-existence-injection.js +49 -0
  58. package/dist/tools/core/file-existence-injection.js.map +1 -0
  59. package/dist/tools/core/git-injection.d.ts +58 -0
  60. package/dist/tools/core/git-injection.d.ts.map +1 -0
  61. package/dist/tools/core/git-injection.js +79 -0
  62. package/dist/tools/core/git-injection.js.map +1 -0
  63. package/dist/tools/core/index.d.ts +1 -0
  64. package/dist/tools/core/index.d.ts.map +1 -1
  65. package/dist/tools/core/index.js +1 -0
  66. package/dist/tools/core/index.js.map +1 -1
  67. package/dist/tools/index.d.ts.map +1 -1
  68. package/dist/tools/index.js +358 -440
  69. package/dist/tools/index.js.map +1 -1
  70. package/dist/transport/__tests__/remote.test.d.ts +2 -0
  71. package/dist/transport/__tests__/remote.test.d.ts.map +1 -0
  72. package/dist/transport/remote.d.ts.map +1 -1
  73. package/dist/transport/remote.js +23 -4
  74. package/dist/transport/remote.js.map +1 -1
  75. package/dist/types/index.d.ts +12 -32
  76. package/dist/types/index.d.ts.map +1 -1
  77. package/dist/types/index.js.map +1 -1
  78. package/dist/validation/index.d.ts.map +1 -1
  79. package/dist/validation/index.js +0 -15
  80. package/dist/validation/index.js.map +1 -1
  81. package/node_modules/@specforge/api-types/README.md +38 -0
  82. package/node_modules/@specforge/api-types/dist/client/appsync-client.d.ts +21 -0
  83. package/node_modules/@specforge/api-types/dist/client/appsync-client.d.ts.map +1 -0
  84. package/node_modules/@specforge/api-types/dist/client/appsync-client.js +2 -0
  85. package/node_modules/@specforge/api-types/dist/client/appsync-client.js.map +1 -0
  86. package/node_modules/@specforge/api-types/dist/client/index.d.ts +2 -0
  87. package/node_modules/@specforge/api-types/dist/client/index.d.ts.map +1 -0
  88. package/node_modules/@specforge/api-types/dist/client/index.js +2 -0
  89. package/node_modules/@specforge/api-types/dist/client/index.js.map +1 -0
  90. package/node_modules/@specforge/api-types/dist/index.d.ts +5 -0
  91. package/node_modules/@specforge/api-types/dist/index.d.ts.map +1 -0
  92. package/node_modules/@specforge/api-types/dist/index.js +9 -0
  93. package/node_modules/@specforge/api-types/dist/index.js.map +1 -0
  94. package/node_modules/@specforge/api-types/dist/mcp/error-guidance.d.ts +74 -0
  95. package/node_modules/@specforge/api-types/dist/mcp/error-guidance.d.ts.map +1 -0
  96. package/node_modules/@specforge/api-types/dist/mcp/error-guidance.js +21 -0
  97. package/node_modules/@specforge/api-types/dist/mcp/error-guidance.js.map +1 -0
  98. package/node_modules/@specforge/api-types/dist/mcp/index.d.ts +4 -0
  99. package/node_modules/@specforge/api-types/dist/mcp/index.d.ts.map +1 -0
  100. package/node_modules/@specforge/api-types/dist/mcp/index.js +8 -0
  101. package/node_modules/@specforge/api-types/dist/mcp/index.js.map +1 -0
  102. package/node_modules/@specforge/api-types/dist/mcp/lifecycle-envelope.d.ts +18 -0
  103. package/node_modules/@specforge/api-types/dist/mcp/lifecycle-envelope.d.ts.map +1 -0
  104. package/node_modules/@specforge/api-types/dist/mcp/lifecycle-envelope.js +2 -0
  105. package/node_modules/@specforge/api-types/dist/mcp/lifecycle-envelope.js.map +1 -0
  106. package/node_modules/@specforge/api-types/dist/mcp/standard-envelope.d.ts +39 -0
  107. package/node_modules/@specforge/api-types/dist/mcp/standard-envelope.d.ts.map +1 -0
  108. package/node_modules/@specforge/api-types/dist/mcp/standard-envelope.js +2 -0
  109. package/node_modules/@specforge/api-types/dist/mcp/standard-envelope.js.map +1 -0
  110. package/node_modules/@specforge/api-types/dist/runtime/billing-record.d.ts +18 -0
  111. package/node_modules/@specforge/api-types/dist/runtime/billing-record.d.ts.map +1 -0
  112. package/node_modules/@specforge/api-types/dist/runtime/billing-record.js +7 -0
  113. package/node_modules/@specforge/api-types/dist/runtime/billing-record.js.map +1 -0
  114. package/node_modules/@specforge/api-types/dist/runtime/blueprint-record.d.ts +40 -0
  115. package/node_modules/@specforge/api-types/dist/runtime/blueprint-record.d.ts.map +1 -0
  116. package/node_modules/@specforge/api-types/dist/runtime/blueprint-record.js +19 -0
  117. package/node_modules/@specforge/api-types/dist/runtime/blueprint-record.js.map +1 -0
  118. package/node_modules/@specforge/api-types/dist/runtime/dependency-tree.d.ts +96 -0
  119. package/node_modules/@specforge/api-types/dist/runtime/dependency-tree.d.ts.map +1 -0
  120. package/node_modules/@specforge/api-types/dist/runtime/dependency-tree.js +23 -0
  121. package/node_modules/@specforge/api-types/dist/runtime/dependency-tree.js.map +1 -0
  122. package/node_modules/@specforge/api-types/dist/runtime/epic-record.d.ts +117 -0
  123. package/node_modules/@specforge/api-types/dist/runtime/epic-record.d.ts.map +1 -0
  124. package/node_modules/@specforge/api-types/dist/runtime/epic-record.js +13 -0
  125. package/node_modules/@specforge/api-types/dist/runtime/epic-record.js.map +1 -0
  126. package/node_modules/@specforge/api-types/dist/runtime/feedback-record.d.ts +27 -0
  127. package/node_modules/@specforge/api-types/dist/runtime/feedback-record.d.ts.map +1 -0
  128. package/node_modules/@specforge/api-types/dist/runtime/feedback-record.js +7 -0
  129. package/node_modules/@specforge/api-types/dist/runtime/feedback-record.js.map +1 -0
  130. package/node_modules/@specforge/api-types/dist/runtime/fields.d.ts +31 -0
  131. package/node_modules/@specforge/api-types/dist/runtime/fields.d.ts.map +1 -0
  132. package/node_modules/@specforge/api-types/dist/runtime/fields.js +156 -0
  133. package/node_modules/@specforge/api-types/dist/runtime/fields.js.map +1 -0
  134. package/node_modules/@specforge/api-types/dist/runtime/index.d.ts +18 -0
  135. package/node_modules/@specforge/api-types/dist/runtime/index.d.ts.map +1 -0
  136. package/node_modules/@specforge/api-types/dist/runtime/index.js +18 -0
  137. package/node_modules/@specforge/api-types/dist/runtime/index.js.map +1 -0
  138. package/node_modules/@specforge/api-types/dist/runtime/pagination.d.ts +38 -0
  139. package/node_modules/@specforge/api-types/dist/runtime/pagination.d.ts.map +1 -0
  140. package/node_modules/@specforge/api-types/dist/runtime/pagination.js +54 -0
  141. package/node_modules/@specforge/api-types/dist/runtime/pagination.js.map +1 -0
  142. package/node_modules/@specforge/api-types/dist/runtime/project-invitation.d.ts +14 -0
  143. package/node_modules/@specforge/api-types/dist/runtime/project-invitation.d.ts.map +1 -0
  144. package/node_modules/@specforge/api-types/dist/runtime/project-invitation.js +2 -0
  145. package/node_modules/@specforge/api-types/dist/runtime/project-invitation.js.map +1 -0
  146. package/node_modules/@specforge/api-types/dist/runtime/project-member.d.ts +13 -0
  147. package/node_modules/@specforge/api-types/dist/runtime/project-member.d.ts.map +1 -0
  148. package/node_modules/@specforge/api-types/dist/runtime/project-member.js +2 -0
  149. package/node_modules/@specforge/api-types/dist/runtime/project-member.js.map +1 -0
  150. package/node_modules/@specforge/api-types/dist/runtime/project-validation.d.ts +26 -0
  151. package/node_modules/@specforge/api-types/dist/runtime/project-validation.d.ts.map +1 -0
  152. package/node_modules/@specforge/api-types/dist/runtime/project-validation.js +5 -0
  153. package/node_modules/@specforge/api-types/dist/runtime/project-validation.js.map +1 -0
  154. package/node_modules/@specforge/api-types/dist/runtime/project.d.ts +55 -0
  155. package/node_modules/@specforge/api-types/dist/runtime/project.d.ts.map +1 -0
  156. package/node_modules/@specforge/api-types/dist/runtime/project.js +10 -0
  157. package/node_modules/@specforge/api-types/dist/runtime/project.js.map +1 -0
  158. package/node_modules/@specforge/api-types/dist/runtime/response.d.ts +22 -0
  159. package/node_modules/@specforge/api-types/dist/runtime/response.d.ts.map +1 -0
  160. package/node_modules/@specforge/api-types/dist/runtime/response.js +14 -0
  161. package/node_modules/@specforge/api-types/dist/runtime/response.js.map +1 -0
  162. package/node_modules/@specforge/api-types/dist/runtime/specification-record.d.ts +90 -0
  163. package/node_modules/@specforge/api-types/dist/runtime/specification-record.d.ts.map +1 -0
  164. package/node_modules/@specforge/api-types/dist/runtime/specification-record.js +11 -0
  165. package/node_modules/@specforge/api-types/dist/runtime/specification-record.js.map +1 -0
  166. package/node_modules/@specforge/api-types/dist/runtime/status.d.ts +26 -0
  167. package/node_modules/@specforge/api-types/dist/runtime/status.d.ts.map +1 -0
  168. package/node_modules/@specforge/api-types/dist/runtime/status.js +56 -0
  169. package/node_modules/@specforge/api-types/dist/runtime/status.js.map +1 -0
  170. package/node_modules/@specforge/api-types/dist/runtime/summary.d.ts +58 -0
  171. package/node_modules/@specforge/api-types/dist/runtime/summary.d.ts.map +1 -0
  172. package/node_modules/@specforge/api-types/dist/runtime/summary.js +42 -0
  173. package/node_modules/@specforge/api-types/dist/runtime/summary.js.map +1 -0
  174. package/node_modules/@specforge/api-types/dist/runtime/ticket-record.d.ts +212 -0
  175. package/node_modules/@specforge/api-types/dist/runtime/ticket-record.d.ts.map +1 -0
  176. package/node_modules/@specforge/api-types/dist/runtime/ticket-record.js +18 -0
  177. package/node_modules/@specforge/api-types/dist/runtime/ticket-record.js.map +1 -0
  178. package/node_modules/@specforge/api-types/dist/runtime/user.d.ts +13 -0
  179. package/node_modules/@specforge/api-types/dist/runtime/user.d.ts.map +1 -0
  180. package/node_modules/@specforge/api-types/dist/runtime/user.js +9 -0
  181. package/node_modules/@specforge/api-types/dist/runtime/user.js.map +1 -0
  182. package/node_modules/@specforge/api-types/dist/stores/i-billing-store.d.ts +17 -0
  183. package/node_modules/@specforge/api-types/dist/stores/i-billing-store.d.ts.map +1 -0
  184. package/node_modules/@specforge/api-types/dist/stores/i-billing-store.js +2 -0
  185. package/node_modules/@specforge/api-types/dist/stores/i-billing-store.js.map +1 -0
  186. package/node_modules/@specforge/api-types/dist/stores/i-blueprint-store.d.ts +59 -0
  187. package/node_modules/@specforge/api-types/dist/stores/i-blueprint-store.d.ts.map +1 -0
  188. package/node_modules/@specforge/api-types/dist/stores/i-blueprint-store.js +2 -0
  189. package/node_modules/@specforge/api-types/dist/stores/i-blueprint-store.js.map +1 -0
  190. package/node_modules/@specforge/api-types/dist/stores/i-epic-store.d.ts +120 -0
  191. package/node_modules/@specforge/api-types/dist/stores/i-epic-store.d.ts.map +1 -0
  192. package/node_modules/@specforge/api-types/dist/stores/i-epic-store.js +2 -0
  193. package/node_modules/@specforge/api-types/dist/stores/i-epic-store.js.map +1 -0
  194. package/node_modules/@specforge/api-types/dist/stores/i-feedback-store.d.ts +13 -0
  195. package/node_modules/@specforge/api-types/dist/stores/i-feedback-store.d.ts.map +1 -0
  196. package/node_modules/@specforge/api-types/dist/stores/i-feedback-store.js +2 -0
  197. package/node_modules/@specforge/api-types/dist/stores/i-feedback-store.js.map +1 -0
  198. package/node_modules/@specforge/api-types/dist/stores/i-project-store.d.ts +48 -0
  199. package/node_modules/@specforge/api-types/dist/stores/i-project-store.d.ts.map +1 -0
  200. package/node_modules/@specforge/api-types/dist/stores/i-project-store.js +2 -0
  201. package/node_modules/@specforge/api-types/dist/stores/i-project-store.js.map +1 -0
  202. package/node_modules/@specforge/api-types/dist/stores/i-sharing-store.d.ts +37 -0
  203. package/node_modules/@specforge/api-types/dist/stores/i-sharing-store.d.ts.map +1 -0
  204. package/node_modules/@specforge/api-types/dist/stores/i-sharing-store.js +2 -0
  205. package/node_modules/@specforge/api-types/dist/stores/i-sharing-store.js.map +1 -0
  206. package/node_modules/@specforge/api-types/dist/stores/i-spec-store.d.ts +159 -0
  207. package/node_modules/@specforge/api-types/dist/stores/i-spec-store.d.ts.map +1 -0
  208. package/node_modules/@specforge/api-types/dist/stores/i-spec-store.js +2 -0
  209. package/node_modules/@specforge/api-types/dist/stores/i-spec-store.js.map +1 -0
  210. package/node_modules/@specforge/api-types/dist/stores/i-ticket-dependency-store.d.ts +87 -0
  211. package/node_modules/@specforge/api-types/dist/stores/i-ticket-dependency-store.d.ts.map +1 -0
  212. package/node_modules/@specforge/api-types/dist/stores/i-ticket-dependency-store.js +2 -0
  213. package/node_modules/@specforge/api-types/dist/stores/i-ticket-dependency-store.js.map +1 -0
  214. package/node_modules/@specforge/api-types/dist/stores/i-ticket-store.d.ts +347 -0
  215. package/node_modules/@specforge/api-types/dist/stores/i-ticket-store.d.ts.map +1 -0
  216. package/node_modules/@specforge/api-types/dist/stores/i-ticket-store.js +2 -0
  217. package/node_modules/@specforge/api-types/dist/stores/i-ticket-store.js.map +1 -0
  218. package/node_modules/@specforge/api-types/dist/stores/i-user-store.d.ts +5 -0
  219. package/node_modules/@specforge/api-types/dist/stores/i-user-store.d.ts.map +1 -0
  220. package/node_modules/@specforge/api-types/dist/stores/i-user-store.js +2 -0
  221. package/node_modules/@specforge/api-types/dist/stores/i-user-store.js.map +1 -0
  222. package/node_modules/@specforge/api-types/dist/stores/index.d.ts +11 -0
  223. package/node_modules/@specforge/api-types/dist/stores/index.d.ts.map +1 -0
  224. package/node_modules/@specforge/api-types/dist/stores/index.js +11 -0
  225. package/node_modules/@specforge/api-types/dist/stores/index.js.map +1 -0
  226. package/node_modules/@specforge/api-types/package.json +43 -0
  227. package/node_modules/@specforge/report-types/README.md +11 -0
  228. package/node_modules/@specforge/report-types/dist/index.d.ts +2 -0
  229. package/node_modules/@specforge/report-types/dist/index.d.ts.map +1 -0
  230. package/node_modules/@specforge/report-types/dist/index.js +2 -0
  231. package/node_modules/@specforge/report-types/dist/index.js.map +1 -0
  232. package/node_modules/@specforge/report-types/dist/reports.d.ts +90 -0
  233. package/node_modules/@specforge/report-types/dist/reports.d.ts.map +1 -0
  234. package/node_modules/@specforge/report-types/dist/reports.js +15 -0
  235. package/node_modules/@specforge/report-types/dist/reports.js.map +1 -0
  236. package/node_modules/@specforge/report-types/package.json +40 -0
  237. package/node_modules/@specforge/session-types/CHANGELOG.md +56 -0
  238. package/node_modules/@specforge/session-types/README.md +18 -0
  239. package/node_modules/@specforge/session-types/dist/index.d.ts +47 -0
  240. package/node_modules/@specforge/session-types/dist/index.d.ts.map +1 -0
  241. package/node_modules/@specforge/session-types/dist/index.js +47 -0
  242. package/node_modules/@specforge/session-types/dist/index.js.map +1 -0
  243. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts +46 -0
  244. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.d.ts.map +1 -0
  245. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js +41 -0
  246. package/node_modules/@specforge/session-types/dist/runtime/aggregator-input.js.map +1 -0
  247. package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts +9 -0
  248. package/node_modules/@specforge/session-types/dist/runtime/discovery.d.ts.map +1 -0
  249. package/node_modules/@specforge/session-types/dist/runtime/discovery.js +2 -0
  250. package/node_modules/@specforge/session-types/dist/runtime/discovery.js.map +1 -0
  251. package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts +51 -0
  252. package/node_modules/@specforge/session-types/dist/runtime/enums.d.ts.map +1 -0
  253. package/node_modules/@specforge/session-types/dist/runtime/enums.js +161 -0
  254. package/node_modules/@specforge/session-types/dist/runtime/enums.js.map +1 -0
  255. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts +177 -0
  256. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.d.ts.map +1 -0
  257. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js +96 -0
  258. package/node_modules/@specforge/session-types/dist/runtime/implementation-config.js.map +1 -0
  259. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts +8 -0
  260. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.d.ts.map +1 -0
  261. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js +2 -0
  262. package/node_modules/@specforge/session-types/dist/runtime/implementation-record-event.js.map +1 -0
  263. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts +489 -0
  264. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.d.ts.map +1 -0
  265. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js +152 -0
  266. package/node_modules/@specforge/session-types/dist/runtime/implementation-session-aggregate.js.map +1 -0
  267. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts +8 -0
  268. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.d.ts.map +1 -0
  269. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js +2 -0
  270. package/node_modules/@specforge/session-types/dist/runtime/implementation-session.js.map +1 -0
  271. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts +319 -0
  272. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.d.ts.map +1 -0
  273. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js +2 -0
  274. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-contract.js.map +1 -0
  275. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts +128 -0
  276. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.d.ts.map +1 -0
  277. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js +30 -0
  278. package/node_modules/@specforge/session-types/dist/runtime/lifecycle-planning-guidance.js.map +1 -0
  279. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts +4 -0
  280. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.d.ts.map +1 -0
  281. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js +2 -0
  282. package/node_modules/@specforge/session-types/dist/runtime/parsed-git-evidence.js.map +1 -0
  283. package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts +82 -0
  284. package/node_modules/@specforge/session-types/dist/runtime/planning-config.d.ts.map +1 -0
  285. package/node_modules/@specforge/session-types/dist/runtime/planning-config.js +61 -0
  286. package/node_modules/@specforge/session-types/dist/runtime/planning-config.js.map +1 -0
  287. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts +34 -0
  288. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.d.ts.map +1 -0
  289. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js +14 -0
  290. package/node_modules/@specforge/session-types/dist/runtime/planning-entity-score-datapoint.js.map +1 -0
  291. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts +6 -0
  292. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.d.ts.map +1 -0
  293. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js +65 -0
  294. package/node_modules/@specforge/session-types/dist/runtime/planning-operations.js.map +1 -0
  295. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts +34 -0
  296. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.d.ts.map +1 -0
  297. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js +22 -0
  298. package/node_modules/@specforge/session-types/dist/runtime/planning-phase-transition.js.map +1 -0
  299. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts +73 -0
  300. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.d.ts.map +1 -0
  301. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js +61 -0
  302. package/node_modules/@specforge/session-types/dist/runtime/planning-session-action.js.map +1 -0
  303. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts +249 -0
  304. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.d.ts.map +1 -0
  305. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js +96 -0
  306. package/node_modules/@specforge/session-types/dist/runtime/planning-session-aggregate.js.map +1 -0
  307. package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts +574 -0
  308. package/node_modules/@specforge/session-types/dist/runtime/planning-session.d.ts.map +1 -0
  309. package/node_modules/@specforge/session-types/dist/runtime/planning-session.js +40 -0
  310. package/node_modules/@specforge/session-types/dist/runtime/planning-session.js.map +1 -0
  311. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts +221 -0
  312. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.d.ts.map +1 -0
  313. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js +41 -0
  314. package/node_modules/@specforge/session-types/dist/runtime/process-guidance.js.map +1 -0
  315. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts +4 -0
  316. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.d.ts.map +1 -0
  317. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js +2 -0
  318. package/node_modules/@specforge/session-types/dist/runtime/work-session-acceptance-check.js.map +1 -0
  319. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts +9 -0
  320. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.d.ts.map +1 -0
  321. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js +2 -0
  322. package/node_modules/@specforge/session-types/dist/runtime/work-session-action.js.map +1 -0
  323. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts +4 -0
  324. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.d.ts.map +1 -0
  325. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js +2 -0
  326. package/node_modules/@specforge/session-types/dist/runtime/work-session-file-change.js.map +1 -0
  327. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts +4 -0
  328. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.d.ts.map +1 -0
  329. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js +2 -0
  330. package/node_modules/@specforge/session-types/dist/runtime/work-session-impl-step-completion.js.map +1 -0
  331. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts +4 -0
  332. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.d.ts.map +1 -0
  333. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js +2 -0
  334. package/node_modules/@specforge/session-types/dist/runtime/work-session-resolution.js.map +1 -0
  335. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts +4 -0
  336. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.d.ts.map +1 -0
  337. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js +2 -0
  338. package/node_modules/@specforge/session-types/dist/runtime/work-session-test-result.js.map +1 -0
  339. package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts +4 -0
  340. package/node_modules/@specforge/session-types/dist/runtime/work-session.d.ts.map +1 -0
  341. package/node_modules/@specforge/session-types/dist/runtime/work-session.js +2 -0
  342. package/node_modules/@specforge/session-types/dist/runtime/work-session.js.map +1 -0
  343. package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts +43 -0
  344. package/node_modules/@specforge/session-types/dist/runtime/working-context.d.ts.map +1 -0
  345. package/node_modules/@specforge/session-types/dist/runtime/working-context.js +2 -0
  346. package/node_modules/@specforge/session-types/dist/runtime/working-context.js.map +1 -0
  347. package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts +146 -0
  348. package/node_modules/@specforge/session-types/dist/runtime/write-plan.d.ts.map +1 -0
  349. package/node_modules/@specforge/session-types/dist/runtime/write-plan.js +2 -0
  350. package/node_modules/@specforge/session-types/dist/runtime/write-plan.js.map +1 -0
  351. package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts +76 -0
  352. package/node_modules/@specforge/session-types/dist/schema/discovery.d.ts.map +1 -0
  353. package/node_modules/@specforge/session-types/dist/schema/discovery.js +42 -0
  354. package/node_modules/@specforge/session-types/dist/schema/discovery.js.map +1 -0
  355. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts +48 -0
  356. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.d.ts.map +1 -0
  357. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js +28 -0
  358. package/node_modules/@specforge/session-types/dist/schema/implementation-record-event.js.map +1 -0
  359. package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts +37 -0
  360. package/node_modules/@specforge/session-types/dist/schema/implementation-session.d.ts.map +1 -0
  361. package/node_modules/@specforge/session-types/dist/schema/implementation-session.js +24 -0
  362. package/node_modules/@specforge/session-types/dist/schema/implementation-session.js.map +1 -0
  363. package/node_modules/@specforge/session-types/dist/schema/index.d.ts +12 -0
  364. package/node_modules/@specforge/session-types/dist/schema/index.d.ts.map +1 -0
  365. package/node_modules/@specforge/session-types/dist/schema/index.js +12 -0
  366. package/node_modules/@specforge/session-types/dist/schema/index.js.map +1 -0
  367. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts +74 -0
  368. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.d.ts.map +1 -0
  369. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js +31 -0
  370. package/node_modules/@specforge/session-types/dist/schema/parsed-git-evidence.js.map +1 -0
  371. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts +27 -0
  372. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.d.ts.map +1 -0
  373. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js +11 -0
  374. package/node_modules/@specforge/session-types/dist/schema/work-session-acceptance-check.js.map +1 -0
  375. package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts +94 -0
  376. package/node_modules/@specforge/session-types/dist/schema/work-session-action.d.ts.map +1 -0
  377. package/node_modules/@specforge/session-types/dist/schema/work-session-action.js +76 -0
  378. package/node_modules/@specforge/session-types/dist/schema/work-session-action.js.map +1 -0
  379. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts +42 -0
  380. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.d.ts.map +1 -0
  381. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js +25 -0
  382. package/node_modules/@specforge/session-types/dist/schema/work-session-file-change.js.map +1 -0
  383. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts +27 -0
  384. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.d.ts.map +1 -0
  385. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js +11 -0
  386. package/node_modules/@specforge/session-types/dist/schema/work-session-impl-step-completion.js.map +1 -0
  387. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts +42 -0
  388. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.d.ts.map +1 -0
  389. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js +28 -0
  390. package/node_modules/@specforge/session-types/dist/schema/work-session-resolution.js.map +1 -0
  391. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts +72 -0
  392. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.d.ts.map +1 -0
  393. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js +43 -0
  394. package/node_modules/@specforge/session-types/dist/schema/work-session-test-result.js.map +1 -0
  395. package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts +203 -0
  396. package/node_modules/@specforge/session-types/dist/schema/work-session.d.ts.map +1 -0
  397. package/node_modules/@specforge/session-types/dist/schema/work-session.js +86 -0
  398. package/node_modules/@specforge/session-types/dist/schema/work-session.js.map +1 -0
  399. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts +17 -0
  400. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.d.ts.map +1 -0
  401. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js +2 -0
  402. package/node_modules/@specforge/session-types/dist/stores/config-store-interface.js.map +1 -0
  403. package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts +31 -0
  404. package/node_modules/@specforge/session-types/dist/stores/discovery-store.d.ts.map +1 -0
  405. package/node_modules/@specforge/session-types/dist/stores/discovery-store.js +2 -0
  406. package/node_modules/@specforge/session-types/dist/stores/discovery-store.js.map +1 -0
  407. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts +19 -0
  408. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.d.ts.map +1 -0
  409. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js +2 -0
  410. package/node_modules/@specforge/session-types/dist/stores/implementation-record-event-store.js.map +1 -0
  411. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts +16 -0
  412. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.d.ts.map +1 -0
  413. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js +2 -0
  414. package/node_modules/@specforge/session-types/dist/stores/implementation-session-aggregate-store.js.map +1 -0
  415. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts +28 -0
  416. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.d.ts.map +1 -0
  417. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js +2 -0
  418. package/node_modules/@specforge/session-types/dist/stores/implementation-session-store.js.map +1 -0
  419. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts +12 -0
  420. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.d.ts.map +1 -0
  421. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js +2 -0
  422. package/node_modules/@specforge/session-types/dist/stores/planning-entity-score-datapoint-store.js.map +1 -0
  423. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts +10 -0
  424. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.d.ts.map +1 -0
  425. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js +2 -0
  426. package/node_modules/@specforge/session-types/dist/stores/planning-phase-transition-store.js.map +1 -0
  427. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts +13 -0
  428. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.d.ts.map +1 -0
  429. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js +2 -0
  430. package/node_modules/@specforge/session-types/dist/stores/planning-session-action-store.js.map +1 -0
  431. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts +10 -0
  432. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.d.ts.map +1 -0
  433. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js +2 -0
  434. package/node_modules/@specforge/session-types/dist/stores/planning-session-aggregate-store.js.map +1 -0
  435. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts +20 -0
  436. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.d.ts.map +1 -0
  437. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js +2 -0
  438. package/node_modules/@specforge/session-types/dist/stores/planning-session-store.js.map +1 -0
  439. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts +15 -0
  440. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.d.ts.map +1 -0
  441. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js +2 -0
  442. package/node_modules/@specforge/session-types/dist/stores/work-session-acceptance-check-store.js.map +1 -0
  443. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts +29 -0
  444. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.d.ts.map +1 -0
  445. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js +2 -0
  446. package/node_modules/@specforge/session-types/dist/stores/work-session-action-store.js.map +1 -0
  447. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts +9 -0
  448. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.d.ts.map +1 -0
  449. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js +2 -0
  450. package/node_modules/@specforge/session-types/dist/stores/work-session-file-change-store.js.map +1 -0
  451. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts +9 -0
  452. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.d.ts.map +1 -0
  453. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js +2 -0
  454. package/node_modules/@specforge/session-types/dist/stores/work-session-impl-step-completion-store.js.map +1 -0
  455. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts +10 -0
  456. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.d.ts.map +1 -0
  457. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js +2 -0
  458. package/node_modules/@specforge/session-types/dist/stores/work-session-resolution-store.js.map +1 -0
  459. package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts +23 -0
  460. package/node_modules/@specforge/session-types/dist/stores/work-session-store.d.ts.map +1 -0
  461. package/node_modules/@specforge/session-types/dist/stores/work-session-store.js +2 -0
  462. package/node_modules/@specforge/session-types/dist/stores/work-session-store.js.map +1 -0
  463. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts +8 -0
  464. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.d.ts.map +1 -0
  465. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js +2 -0
  466. package/node_modules/@specforge/session-types/dist/stores/work-session-test-result-store.js.map +1 -0
  467. package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts +27 -0
  468. package/node_modules/@specforge/session-types/dist/stores/working-context-store.d.ts.map +1 -0
  469. package/node_modules/@specforge/session-types/dist/stores/working-context-store.js +2 -0
  470. package/node_modules/@specforge/session-types/dist/stores/working-context-store.js.map +1 -0
  471. package/node_modules/@specforge/session-types/package.json +43 -0
  472. package/node_modules/@specforge/spec-types/README.md +28 -0
  473. package/node_modules/@specforge/spec-types/dist/index.d.ts +4 -0
  474. package/node_modules/@specforge/spec-types/dist/index.d.ts.map +1 -0
  475. package/node_modules/@specforge/spec-types/dist/index.js +6 -0
  476. package/node_modules/@specforge/spec-types/dist/index.js.map +1 -0
  477. package/node_modules/@specforge/spec-types/dist/json-schema/v1.1/openspec.schema.json +1129 -0
  478. package/node_modules/@specforge/spec-types/dist/openspec-schema.d.ts +4 -0
  479. package/node_modules/@specforge/spec-types/dist/openspec-schema.d.ts.map +1 -0
  480. package/node_modules/@specforge/spec-types/dist/openspec-schema.js +77 -0
  481. package/node_modules/@specforge/spec-types/dist/openspec-schema.js.map +1 -0
  482. package/node_modules/@specforge/spec-types/dist/runtime/auxiliary.d.ts +14 -0
  483. package/node_modules/@specforge/spec-types/dist/runtime/auxiliary.d.ts.map +1 -0
  484. package/node_modules/@specforge/spec-types/dist/runtime/auxiliary.js +2 -0
  485. package/node_modules/@specforge/spec-types/dist/runtime/auxiliary.js.map +1 -0
  486. package/node_modules/@specforge/spec-types/dist/runtime/blueprint.d.ts +7 -0
  487. package/node_modules/@specforge/spec-types/dist/runtime/blueprint.d.ts.map +1 -0
  488. package/node_modules/@specforge/spec-types/dist/runtime/blueprint.js +2 -0
  489. package/node_modules/@specforge/spec-types/dist/runtime/blueprint.js.map +1 -0
  490. package/node_modules/@specforge/spec-types/dist/runtime/epic.d.ts +2 -0
  491. package/node_modules/@specforge/spec-types/dist/runtime/epic.d.ts.map +1 -0
  492. package/node_modules/@specforge/spec-types/dist/runtime/epic.js +2 -0
  493. package/node_modules/@specforge/spec-types/dist/runtime/epic.js.map +1 -0
  494. package/node_modules/@specforge/spec-types/dist/runtime/index.d.ts +7 -0
  495. package/node_modules/@specforge/spec-types/dist/runtime/index.d.ts.map +1 -0
  496. package/node_modules/@specforge/spec-types/dist/runtime/index.js +7 -0
  497. package/node_modules/@specforge/spec-types/dist/runtime/index.js.map +1 -0
  498. package/node_modules/@specforge/spec-types/dist/runtime/planning/api-contract.d.ts +2 -0
  499. package/node_modules/@specforge/spec-types/dist/runtime/planning/api-contract.d.ts.map +1 -0
  500. package/node_modules/@specforge/spec-types/dist/runtime/planning/api-contract.js +2 -0
  501. package/node_modules/@specforge/spec-types/dist/runtime/planning/api-contract.js.map +1 -0
  502. package/node_modules/@specforge/spec-types/dist/runtime/planning/goal.d.ts +2 -0
  503. package/node_modules/@specforge/spec-types/dist/runtime/planning/goal.d.ts.map +1 -0
  504. package/node_modules/@specforge/spec-types/dist/runtime/planning/goal.js +2 -0
  505. package/node_modules/@specforge/spec-types/dist/runtime/planning/goal.js.map +1 -0
  506. package/node_modules/@specforge/spec-types/dist/runtime/planning/guardrail.d.ts +2 -0
  507. package/node_modules/@specforge/spec-types/dist/runtime/planning/guardrail.d.ts.map +1 -0
  508. package/node_modules/@specforge/spec-types/dist/runtime/planning/guardrail.js +2 -0
  509. package/node_modules/@specforge/spec-types/dist/runtime/planning/guardrail.js.map +1 -0
  510. package/node_modules/@specforge/spec-types/dist/runtime/planning/index.d.ts +10 -0
  511. package/node_modules/@specforge/spec-types/dist/runtime/planning/index.d.ts.map +1 -0
  512. package/node_modules/@specforge/spec-types/dist/runtime/planning/index.js +10 -0
  513. package/node_modules/@specforge/spec-types/dist/runtime/planning/index.js.map +1 -0
  514. package/node_modules/@specforge/spec-types/dist/runtime/planning/nfr.d.ts +2 -0
  515. package/node_modules/@specforge/spec-types/dist/runtime/planning/nfr.d.ts.map +1 -0
  516. package/node_modules/@specforge/spec-types/dist/runtime/planning/nfr.js +2 -0
  517. package/node_modules/@specforge/spec-types/dist/runtime/planning/nfr.js.map +1 -0
  518. package/node_modules/@specforge/spec-types/dist/runtime/planning/requirement.d.ts +2 -0
  519. package/node_modules/@specforge/spec-types/dist/runtime/planning/requirement.d.ts.map +1 -0
  520. package/node_modules/@specforge/spec-types/dist/runtime/planning/requirement.js +2 -0
  521. package/node_modules/@specforge/spec-types/dist/runtime/planning/requirement.js.map +1 -0
  522. package/node_modules/@specforge/spec-types/dist/runtime/planning/scope.d.ts +2 -0
  523. package/node_modules/@specforge/spec-types/dist/runtime/planning/scope.d.ts.map +1 -0
  524. package/node_modules/@specforge/spec-types/dist/runtime/planning/scope.js +2 -0
  525. package/node_modules/@specforge/spec-types/dist/runtime/planning/scope.js.map +1 -0
  526. package/node_modules/@specforge/spec-types/dist/runtime/planning/shared-pattern.d.ts +2 -0
  527. package/node_modules/@specforge/spec-types/dist/runtime/planning/shared-pattern.d.ts.map +1 -0
  528. package/node_modules/@specforge/spec-types/dist/runtime/planning/shared-pattern.js +2 -0
  529. package/node_modules/@specforge/spec-types/dist/runtime/planning/shared-pattern.js.map +1 -0
  530. package/node_modules/@specforge/spec-types/dist/runtime/planning/structure-item.d.ts +2 -0
  531. package/node_modules/@specforge/spec-types/dist/runtime/planning/structure-item.d.ts.map +1 -0
  532. package/node_modules/@specforge/spec-types/dist/runtime/planning/structure-item.js +2 -0
  533. package/node_modules/@specforge/spec-types/dist/runtime/planning/structure-item.js.map +1 -0
  534. package/node_modules/@specforge/spec-types/dist/runtime/planning/tech-stack.d.ts +2 -0
  535. package/node_modules/@specforge/spec-types/dist/runtime/planning/tech-stack.d.ts.map +1 -0
  536. package/node_modules/@specforge/spec-types/dist/runtime/planning/tech-stack.js +2 -0
  537. package/node_modules/@specforge/spec-types/dist/runtime/planning/tech-stack.js.map +1 -0
  538. package/node_modules/@specforge/spec-types/dist/runtime/specification.d.ts +2 -0
  539. package/node_modules/@specforge/spec-types/dist/runtime/specification.d.ts.map +1 -0
  540. package/node_modules/@specforge/spec-types/dist/runtime/specification.js +2 -0
  541. package/node_modules/@specforge/spec-types/dist/runtime/specification.js.map +1 -0
  542. package/node_modules/@specforge/spec-types/dist/runtime/ticket.d.ts +2 -0
  543. package/node_modules/@specforge/spec-types/dist/runtime/ticket.d.ts.map +1 -0
  544. package/node_modules/@specforge/spec-types/dist/runtime/ticket.js +2 -0
  545. package/node_modules/@specforge/spec-types/dist/runtime/ticket.js.map +1 -0
  546. package/node_modules/@specforge/spec-types/dist/schema/auxiliary.d.ts +266 -0
  547. package/node_modules/@specforge/spec-types/dist/schema/auxiliary.d.ts.map +1 -0
  548. package/node_modules/@specforge/spec-types/dist/schema/auxiliary.js +143 -0
  549. package/node_modules/@specforge/spec-types/dist/schema/auxiliary.js.map +1 -0
  550. package/node_modules/@specforge/spec-types/dist/schema/blueprint.d.ts +47 -0
  551. package/node_modules/@specforge/spec-types/dist/schema/blueprint.d.ts.map +1 -0
  552. package/node_modules/@specforge/spec-types/dist/schema/blueprint.js +33 -0
  553. package/node_modules/@specforge/spec-types/dist/schema/blueprint.js.map +1 -0
  554. package/node_modules/@specforge/spec-types/dist/schema/entity-field-schemas.d.ts +33 -0
  555. package/node_modules/@specforge/spec-types/dist/schema/entity-field-schemas.d.ts.map +1 -0
  556. package/node_modules/@specforge/spec-types/dist/schema/entity-field-schemas.js +181 -0
  557. package/node_modules/@specforge/spec-types/dist/schema/entity-field-schemas.js.map +1 -0
  558. package/node_modules/@specforge/spec-types/dist/schema/epic.d.ts +955 -0
  559. package/node_modules/@specforge/spec-types/dist/schema/epic.d.ts.map +1 -0
  560. package/node_modules/@specforge/spec-types/dist/schema/epic.js +33 -0
  561. package/node_modules/@specforge/spec-types/dist/schema/epic.js.map +1 -0
  562. package/node_modules/@specforge/spec-types/dist/schema/index.d.ts +12 -0
  563. package/node_modules/@specforge/spec-types/dist/schema/index.d.ts.map +1 -0
  564. package/node_modules/@specforge/spec-types/dist/schema/index.js +25 -0
  565. package/node_modules/@specforge/spec-types/dist/schema/index.js.map +1 -0
  566. package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.d.ts +174 -0
  567. package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.d.ts.map +1 -0
  568. package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.js +317 -0
  569. package/node_modules/@specforge/spec-types/dist/schema/node-verb-steps.js.map +1 -0
  570. package/node_modules/@specforge/spec-types/dist/schema/patterns.d.ts +274 -0
  571. package/node_modules/@specforge/spec-types/dist/schema/patterns.d.ts.map +1 -0
  572. package/node_modules/@specforge/spec-types/dist/schema/patterns.js +106 -0
  573. package/node_modules/@specforge/spec-types/dist/schema/patterns.js.map +1 -0
  574. package/node_modules/@specforge/spec-types/dist/schema/planning/api-contract.d.ts +44 -0
  575. package/node_modules/@specforge/spec-types/dist/schema/planning/api-contract.d.ts.map +1 -0
  576. package/node_modules/@specforge/spec-types/dist/schema/planning/api-contract.js +13 -0
  577. package/node_modules/@specforge/spec-types/dist/schema/planning/api-contract.js.map +1 -0
  578. package/node_modules/@specforge/spec-types/dist/schema/planning/epic-category.d.ts +21 -0
  579. package/node_modules/@specforge/spec-types/dist/schema/planning/epic-category.d.ts.map +1 -0
  580. package/node_modules/@specforge/spec-types/dist/schema/planning/epic-category.js +14 -0
  581. package/node_modules/@specforge/spec-types/dist/schema/planning/epic-category.js.map +1 -0
  582. package/node_modules/@specforge/spec-types/dist/schema/planning/goal.d.ts +27 -0
  583. package/node_modules/@specforge/spec-types/dist/schema/planning/goal.d.ts.map +1 -0
  584. package/node_modules/@specforge/spec-types/dist/schema/planning/goal.js +13 -0
  585. package/node_modules/@specforge/spec-types/dist/schema/planning/goal.js.map +1 -0
  586. package/node_modules/@specforge/spec-types/dist/schema/planning/guardrail.d.ts +29 -0
  587. package/node_modules/@specforge/spec-types/dist/schema/planning/guardrail.d.ts.map +1 -0
  588. package/node_modules/@specforge/spec-types/dist/schema/planning/guardrail.js +14 -0
  589. package/node_modules/@specforge/spec-types/dist/schema/planning/guardrail.js.map +1 -0
  590. package/node_modules/@specforge/spec-types/dist/schema/planning/index.d.ts +12 -0
  591. package/node_modules/@specforge/spec-types/dist/schema/planning/index.d.ts.map +1 -0
  592. package/node_modules/@specforge/spec-types/dist/schema/planning/index.js +12 -0
  593. package/node_modules/@specforge/spec-types/dist/schema/planning/index.js.map +1 -0
  594. package/node_modules/@specforge/spec-types/dist/schema/planning/nfr.d.ts +27 -0
  595. package/node_modules/@specforge/spec-types/dist/schema/planning/nfr.d.ts.map +1 -0
  596. package/node_modules/@specforge/spec-types/dist/schema/planning/nfr.js +15 -0
  597. package/node_modules/@specforge/spec-types/dist/schema/planning/nfr.js.map +1 -0
  598. package/node_modules/@specforge/spec-types/dist/schema/planning/planning-type.d.ts +17 -0
  599. package/node_modules/@specforge/spec-types/dist/schema/planning/planning-type.d.ts.map +1 -0
  600. package/node_modules/@specforge/spec-types/dist/schema/planning/planning-type.js +16 -0
  601. package/node_modules/@specforge/spec-types/dist/schema/planning/planning-type.js.map +1 -0
  602. package/node_modules/@specforge/spec-types/dist/schema/planning/requirement.d.ts +63 -0
  603. package/node_modules/@specforge/spec-types/dist/schema/planning/requirement.d.ts.map +1 -0
  604. package/node_modules/@specforge/spec-types/dist/schema/planning/requirement.js +16 -0
  605. package/node_modules/@specforge/spec-types/dist/schema/planning/requirement.js.map +1 -0
  606. package/node_modules/@specforge/spec-types/dist/schema/planning/scope.d.ts +19 -0
  607. package/node_modules/@specforge/spec-types/dist/schema/planning/scope.d.ts.map +1 -0
  608. package/node_modules/@specforge/spec-types/dist/schema/planning/scope.js +8 -0
  609. package/node_modules/@specforge/spec-types/dist/schema/planning/scope.js.map +1 -0
  610. package/node_modules/@specforge/spec-types/dist/schema/planning/shared-pattern.d.ts +51 -0
  611. package/node_modules/@specforge/spec-types/dist/schema/planning/shared-pattern.d.ts.map +1 -0
  612. package/node_modules/@specforge/spec-types/dist/schema/planning/shared-pattern.js +16 -0
  613. package/node_modules/@specforge/spec-types/dist/schema/planning/shared-pattern.js.map +1 -0
  614. package/node_modules/@specforge/spec-types/dist/schema/planning/structure-item.d.ts +19 -0
  615. package/node_modules/@specforge/spec-types/dist/schema/planning/structure-item.d.ts.map +1 -0
  616. package/node_modules/@specforge/spec-types/dist/schema/planning/structure-item.js +8 -0
  617. package/node_modules/@specforge/spec-types/dist/schema/planning/structure-item.js.map +1 -0
  618. package/node_modules/@specforge/spec-types/dist/schema/planning/tech-stack.d.ts +27 -0
  619. package/node_modules/@specforge/spec-types/dist/schema/planning/tech-stack.d.ts.map +1 -0
  620. package/node_modules/@specforge/spec-types/dist/schema/planning/tech-stack.js +14 -0
  621. package/node_modules/@specforge/spec-types/dist/schema/planning/tech-stack.js.map +1 -0
  622. package/node_modules/@specforge/spec-types/dist/schema/specification.d.ts +1839 -0
  623. package/node_modules/@specforge/spec-types/dist/schema/specification.d.ts.map +1 -0
  624. package/node_modules/@specforge/spec-types/dist/schema/specification.js +43 -0
  625. package/node_modules/@specforge/spec-types/dist/schema/specification.js.map +1 -0
  626. package/node_modules/@specforge/spec-types/dist/schema/step-link-coverage.d.ts +58 -0
  627. package/node_modules/@specforge/spec-types/dist/schema/step-link-coverage.d.ts.map +1 -0
  628. package/node_modules/@specforge/spec-types/dist/schema/step-link-coverage.js +73 -0
  629. package/node_modules/@specforge/spec-types/dist/schema/step-link-coverage.js.map +1 -0
  630. package/node_modules/@specforge/spec-types/dist/schema/step-link-ids.d.ts +71 -0
  631. package/node_modules/@specforge/spec-types/dist/schema/step-link-ids.d.ts.map +1 -0
  632. package/node_modules/@specforge/spec-types/dist/schema/step-link-ids.js +96 -0
  633. package/node_modules/@specforge/spec-types/dist/schema/step-link-ids.js.map +1 -0
  634. package/node_modules/@specforge/spec-types/dist/schema/ticket.d.ts +444 -0
  635. package/node_modules/@specforge/spec-types/dist/schema/ticket.d.ts.map +1 -0
  636. package/node_modules/@specforge/spec-types/dist/schema/ticket.js +49 -0
  637. package/node_modules/@specforge/spec-types/dist/schema/ticket.js.map +1 -0
  638. package/node_modules/@specforge/spec-types/package.json +41 -0
  639. package/package.json +40 -25
  640. package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +135 -51
  641. package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +124 -83
  642. package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +247 -163
  643. package/src/cli/templates/agents/content/core/sfag-work-resolver.ts +211 -0
  644. package/src/cli/templates/agents/index.ts +2 -0
  645. package/src/cli/templates/content/sf-commit.ts +2 -2
  646. package/src/cli/templates/content/sf-reset.ts +45 -28
  647. package/src/cli/templates/skills/specforge-orchestrator.md +15 -10
  648. package/src/cli/templates/skills/specforge-worker.md +4 -3
@@ -1,33 +1,52 @@
1
1
  /**
2
- * SFAG-Ticket-Implementer Agent Template v2
2
+ * SFAG-Ticket-Implementer Agent Template v3 (M23.4)
3
3
  *
4
- * SpecForge ticket implementation with strict lifecycle tracking.
5
- * No tutorials. No best practices guides. Just workflow and execution.
4
+ * Autonomous SpecForge ticket implementation over the WORK lifecycle
5
+ * (SWS/AWS/CWS). Rewritten for the assay-scored work model:
6
+ *
7
+ * - start_work_session (SWS) begins/resumes work on a `ready` ticket and
8
+ * returns the full orientation (context + plan + the assay action briefing);
9
+ * it enforces the git-clean precondition — a dirty worktree denies SWS.
10
+ * - action_work_session (AWS) records progress with the assay ACTION VOCAB —
11
+ * mark steps/AC, record tests/files, and justify skips/failures/divergences —
12
+ * worked in the assay-driven order Implementation steps → Tests → Files →
13
+ * Acceptance criteria. Each call re-runs the assay; the agent reads the
14
+ * returned guidance/progress/coherence.
15
+ * - complete_work_session (CWS) runs the completion gates and finalizes.
16
+ *
17
+ * This agent RECORDS blockers/discoveries (create_discovery); it does NOT
18
+ * resolve them — that is the human's `resolve_discovery` (web app) + the
19
+ * sfag-work-resolver chat agent. There is no `clear_ticket_block`,
20
+ * `set_ticket_blocked`, or coarse session-reset verb.
21
+ *
22
+ * Fully autonomous — zero human touch. The agent picks the next `ready` ticket,
23
+ * implements it, records everything, and on a blocking discovery moves to the
24
+ * next `ready` ticket without waiting for a human.
6
25
  */
7
26
 
8
27
  import type { AgentTemplate } from '../../../../commands/scaffold/agent-types.js';
9
28
 
10
29
  export const SFAG_TICKET_IMPLEMENTER: AgentTemplate = {
11
30
  name: 'sfag-ticket-implementer',
12
- description: 'Implement SpecForge tickets with lifecycle tracking',
13
- triggerDescription: `Use this agent when implementing tickets from a SpecForge specification. Handles the full lifecycle: start session implementtrack progress validate complete.
31
+ description: 'Implement SpecForge tickets autonomously over the work lifecycle (SWS/AWS/CWS)',
32
+ triggerDescription: `Use this agent to implement tickets from a SpecForge specification autonomously. It runs the full work lifecycle: start_work_sessionaction_work_session (record steps/AC/tests/files) complete_work_session, picking up ready tickets and driving them to done without human intervention.
14
33
 
15
34
  <example>
16
35
  Context: User wants to implement a specific ticket
17
36
  user: "Implementa o ticket AUTH-003"
18
- assistant: "Launching sfag-ticket-implementer to implement AUTH-003 with full session tracking."
37
+ assistant: "Launching sfag-ticket-implementer to run AUTH-003 through the work lifecycle."
19
38
  </example>
20
39
 
21
40
  <example>
22
- Context: User ran get_next_actionable_tickets and picked one
23
- user: "Pega o próximo ticket"
24
- assistant: "Launching sfag-ticket-implementer to pick up the next actionable ticket."
41
+ Context: User wants the agent to keep implementing ready tickets
42
+ user: "Pega o próximo ticket pronto e implementa"
43
+ assistant: "Launching sfag-ticket-implementer to pick up the next ready ticket and implement it end to end."
25
44
  </example>
26
45
 
27
46
  <example>
28
- Context: User wants to continue implementation flow
29
- user: "Continua a implementação"
30
- assistant: "Launching sfag-ticket-implementer to resume the implementation session."
47
+ Context: A paused session needs to be resumed after a discovery was resolved
48
+ user: "O ticket foi desbloqueado, continua a implementação"
49
+ assistant: "Launching sfag-ticket-implementer start_work_session re-attaches the paused session and continues."
31
50
  </example>`,
32
51
  model: 'sonnet',
33
52
  color: 'blue',
@@ -35,7 +54,10 @@ assistant: "Launching sfag-ticket-implementer to resume the implementation sessi
35
54
  memory: 'project',
36
55
  content: `# SpecForge Ticket Implementer Agent
37
56
 
38
- You implement SpecForge tickets. You follow the lifecycle religiously. You track everything. You don't skip steps.
57
+ You implement SpecForge tickets over the **work lifecycle**. You are fully autonomous:
58
+ you pick a ready ticket, implement it, record every dimension through the assay, and
59
+ complete it — no human in the loop, no approvals to wait on. You follow the lifecycle
60
+ exactly. You track everything. You do not skip steps.
39
61
 
40
62
  ## Context Bootstrapping
41
63
 
@@ -45,215 +67,277 @@ Read .specforge.json from project root → extract:
45
67
  - project.id → projectId
46
68
  - activeSpecification.id → specificationId
47
69
  \`\`\`
48
- All tool calls that need specificationId use this value. No session store, no get_working_context.
70
+ All tool calls that need specificationId use this value. No session store, no polling verb.
49
71
 
50
- ## Workflow (MANDATORYno shortcuts)
72
+ ## The lifecyclethree verbs, one loop
51
73
 
52
- The lifecycle has 4 tools. Use them in order:
74
+ The work lifecycle has exactly three verbs. Use them in order, per ticket:
53
75
 
54
- 1. **start_work_session** — Begin work (ready → active)
55
- 2. **action_work_session** Track progress, validate ACs, report tests, track files, report discoveries
56
- 3. **complete_work_session** Finalize (active done, requires all steps + ACs)
76
+ 1. **start_work_session (SWS)** — begin (or resume) work on a \`ready\` ticket.
77
+ Flips \`ready active\`, creates the WorkSession, and RETURNS the full orientation:
78
+ spec/epic/ticket context, the implementation steps, acceptance criteria, planned
79
+ files, test specification, blueprints, and the assay action briefing. You do NOT
80
+ need a separate context read — SWS delivers it.
81
+ 2. **action_work_session (AWS)** — record progress with the **assay action vocab**
82
+ (below). Every call re-runs the assay and returns fresh guidance + scores.
83
+ 3. **complete_work_session (CWS)** — run the completion gates and finalize
84
+ (\`active → done\`); the count cascade unblocks dependents.
57
85
 
58
- These are the ONLY ways to interact with the ticket lifecycle. Don't update tickets directly.
86
+ These are the ONLY ways to interact with the ticket lifecycle. Never update tickets directly.
59
87
 
60
- ### Step 1: Acquire Ticket
88
+ ## The git-clean precondition (before EVERY start_work_session)
61
89
 
62
- If the user gives a ticket ID:
63
- \`\`\`
64
- get_ticket({ ticketId, include: ["dependencies", "statusReason"] })
65
- \`\`\`
90
+ SWS enforces a **clean worktree**. The MCP-local layer runs \`git status\` for you and
91
+ feeds the result into SWS as the git-clean precondition. If the worktree has uncommitted
92
+ changes, SWS is **denied** (\`git_dirty\`) and no session starts.
93
+
94
+ So, before every \`start_work_session\`:
95
+ - **Commit or stash prior work** so the worktree is clean.
96
+ - One ticket's changes are committed before you start the next ticket's session.
97
+
98
+ (If you are not inside a git worktree, SWS still runs — the precondition treats a
99
+ non-git caller as clean.)
100
+
101
+ ## Step 1: Pick a ticket (autonomous)
66
102
 
67
- If the user says "next" or "próximo":
103
+ Pick the next actionable ticket yourself — no need to ask anyone:
68
104
  \`\`\`
69
105
  get_next_actionable_tickets({ specificationId, limit: 3 })
70
106
  \`\`\`
71
- Present options. Let the user pick. Don't pick for them.
107
+ Take the top \`ready\` ticket. If the user named a specific ticket, use that id instead.
108
+ Keep going through ready tickets until none remain.
72
109
 
73
- ### Step 2: Load Context (BEFORE writing any code)
110
+ ## Step 2: Start the session
74
111
 
112
+ Ensure the worktree is clean (see the git-clean precondition), then:
75
113
  \`\`\`
76
114
  start_work_session({ ticketId })
77
- // ready → active, creates WorkSession
78
-
79
- get_implementation_context({ ticketId, depth: "full" })
80
- get_patterns({ ticketId })
115
+ // ready → active; returns the full orientation + workSessionId (the sessionId).
81
116
  \`\`\`
117
+ Read the orientation in full. It IS your brief:
118
+ - **Implementation steps** — your checklist, in order.
119
+ - **Acceptance criteria** — what you must prove holds.
120
+ - **Planned files** — create/modify/delete/reference; stay in scope.
121
+ - **Test specification** — the test types, quality gates, and commands to run.
122
+ - **Blueprints & reference snippets** — the exact patterns/types this ticket must follow.
123
+ - **Pending discoveries / file-conflict warnings** — what other sessions have flagged.
82
124
 
83
- From context, understand:
84
- - **Implementation steps** your checklist, follow it in order
85
- - **Acceptance criteria** what you must prove works
86
- - **Files to create/modify** — your scope, don't drift
87
- - **Dependencies** — all must be \`done\`, verify if unsure
88
- - **Patterns** — code conventions from spec → epic → ticket inheritance
89
- - **Test requirements** — check tags (\`needs:unit-test\`, \`needs:e2e\`, etc.) and test-related ACs
90
-
91
- ### Step 3: Implement + Track
125
+ If SWS comes back \`outcome: "denied"\`, read the guidance and act on it: \`git_dirty\` →
126
+ commit and retry; \`unfinished_dependencies\` a dependency is not \`done\`, pick a
127
+ different ready ticket; an aborted implementation stop, this spec is off-limits.
92
128
 
93
- For EACH implementation step:
129
+ ## Step 3: Implement + record — the assay-driven order
94
130
 
95
- 1. Read referenced files, understand existing code
96
- 2. Write code following the project's patterns (not generic best practices)
97
- 3. Report progress immediately after completing:
131
+ Work the four tracked dimensions **in this order** (the assay's order):
98
132
 
99
- \`\`\`
100
- action_work_session({
101
- ticketId,
102
- steps: [{ index: 0, completed: true, notes: "Created user service" }],
103
- filesCreated: ["src/services/user.ts"],
104
- filesModified: ["src/index.ts"]
105
- })
106
- \`\`\`
133
+ **Implementation steps → Tests → Files → Acceptance criteria**
107
134
 
108
- **Rules:**
109
- - Mark steps completed ONLY after actually implementing them
110
- - Track files as you go — don't batch at the end
111
- - If a step is unclear, check the implementation context again before guessing
135
+ Record every dimension via \`action_work_session\`, passing the **assay action** as the
136
+ \`action\` object (the discriminated payload). Always include the \`workSessionId\` from SWS.
112
137
 
113
- ### Step 4: Write Tests
114
-
115
- If the ticket has test-related acceptance criteria or test tags:
116
-
117
- 1. Write the tests specified (unit, integration, e2e — as defined in the AC)
118
- 2. Create seed data / fixtures if specified
119
- 3. Run the tests
120
- 4. Report results:
138
+ ### 3a. Implementation steps (IS)
121
139
 
140
+ Implement each step following the ticket's patterns (not generic best practices). After a
141
+ step is actually done, mark it:
122
142
  \`\`\`
123
143
  action_work_session({
124
144
  ticketId,
125
- testResults: [{
126
- testType: "unit",
127
- passed: 5,
128
- failed: 0,
129
- command: "npm test -- --filter user.test.ts"
130
- }],
131
- filesCreated: ["src/services/__tests__/user.test.ts"]
145
+ action: {
146
+ action: "mark_implementation_step_completion",
147
+ workSessionId,
148
+ implementationStepId: "<step id>", // or allStepsDone: true to mark them all
149
+ notes: "Created the user service"
150
+ }
132
151
  })
133
152
  \`\`\`
153
+ Mark a step done ONLY after implementing it. Do not batch at the end.
134
154
 
135
- **If tests fail:** Fix the code, not the test (unless the test is wrong). Re-run. Report again.
136
-
137
- ### Step 5: Validate Acceptance Criteria
138
-
139
- For EACH acceptance criterion:
140
- - Verify it's actually met (run test, check behavior, review output)
141
- - Mark as validated with evidence:
155
+ ### 3b. Tests
142
156
 
157
+ Run the tests the test specification calls for, then record each run per \`testType\`:
143
158
  \`\`\`
144
159
  action_work_session({
145
160
  ticketId,
146
- acceptanceCriteria: [
147
- { index: 0, validated: true, notes: "Verified: returns 201 with user object" },
148
- { index: 1, validated: true, notes: "Verified: returns 409 for duplicate email" }
149
- ]
161
+ action: {
162
+ action: "record_test_result",
163
+ workSessionId,
164
+ result: {
165
+ testType: "unit", passed: 5, failed: 0, total: 5, skipped: 0,
166
+ allPassed: true, command: "pnpm test user.test.ts"
167
+ }
168
+ }
150
169
  })
151
170
  \`\`\`
152
-
153
- **Do NOT mark ACs as validated without verification.** "I think it works" is not validation.
154
-
155
- ### Step 6: Complete
156
-
157
- Only when ALL steps are done AND ALL ACs are validated:
158
-
171
+ If a test is **skipped** or a failure is **accepted**, justify it — an unjustified skip
172
+ or failure lowers coherence and blocks completion:
159
173
  \`\`\`
160
- complete_work_session({
161
- ticketId,
162
- summary: "Implemented user registration: service, endpoint, validation, tests",
163
- filesCreated: [...],
164
- filesModified: [...],
165
- testResults: { passed: 8, failed: 0 }
166
- })
167
- // active → done, finalizes WorkSession, unblocks dependents
174
+ action_work_session({ ticketId, action: {
175
+ action: "add_skip_justification", workSessionId, testType: "e2e",
176
+ justification: "E2e harness not provisioned in CI; covered by integration tests."
177
+ }})
168
178
  \`\`\`
179
+ Use \`add_failure_justification\` for an accepted failure. Fix code before you justify —
180
+ justify only what genuinely cannot pass. After a human rejects a justification, replace it
181
+ with \`amend_skip_justification\` / \`amend_failure_justification\`.
169
182
 
170
- The completion gate WILL reject you if steps or ACs are incomplete. Don't try to skip.
171
-
172
- ## Handling Discoveries
183
+ ### 3c. Files
173
184
 
174
- Use \`action_work_session\` with the \`discovery\` parameter whenever you find something noteworthy during implementation. This is NOT optional if you see it, report it.
185
+ Report the real outcome of each touched file. In a git worktree the MCP-local layer
186
+ injects the created/modified/deleted set for you from \`git status\`; you still report any
187
+ \`referenced\` file git cannot see, and any file the plan did not list:
188
+ \`\`\`
189
+ action_work_session({ ticketId, action: {
190
+ action: "record_file_change", workSessionId, ticketId,
191
+ expectedPath: "src/services/user.ts", expectedAction: "create",
192
+ actualAction: "created", status: "matched"
193
+ }})
194
+ \`\`\`
195
+ Any **extra or divergent** file (not in the planned set) needs a justification, or it
196
+ costs coherence:
197
+ \`\`\`
198
+ action_work_session({ ticketId, action: {
199
+ action: "add_file_change_justification", workSessionId,
200
+ expectedPath: "src/util/hash.ts", expectedAction: "create",
201
+ justification: "Extracted the hashing helper the AC requires; shared by the service."
202
+ }})
203
+ \`\`\`
204
+ Use \`amend_file_change_justification\` to replace one after a rejection.
175
205
 
176
- Each discovery MUST include two parts:
177
- 1. **Observation** — What you concretely found (facts, evidence, code locations)
178
- 2. **Evaluation** — Why it matters, impact assessment, and possible approaches or recommendations
206
+ ### 3d. Acceptance criteria (AC)
179
207
 
180
- ### Blocker (prevents continuing)
208
+ Only after the code, tests, and files are recorded, verify each AC actually holds (run the
209
+ test, check the behavior, review the output), then mark it:
181
210
  \`\`\`
182
- action_work_session({
183
- ticketId,
184
- discovery: {
185
- description: "Observation: The /api/users endpoint referenced by BACK-012 returns 404 — the route handler hasn't been implemented yet. Evaluation: This blocks user registration flow entirely since we depend on it for account creation. Options: (1) wait for BACK-012 to land, (2) stub the endpoint locally for dev, (3) reorder tickets to implement BACK-012 first.",
186
- type: "blocker",
187
- severity: "blocker"
188
- }
189
- })
190
-
191
- // Then block the ticket:
192
- action_work_session({
193
- ticketId,
194
- blockReason: "Depends on BACK-012 — API endpoint not available"
195
- })
196
- // active → pending
211
+ action_work_session({ ticketId, action: {
212
+ action: "mark_acceptance_check",
213
+ workSessionId,
214
+ acceptanceCriterionId: "<criterion id>", // or allACValidated: true
215
+ notes: "Verified: returns 201 with the user object"
216
+ }})
197
217
  \`\`\`
198
- Tell the user what's blocked and why. Move to next ticket if available.
199
-
200
- ### Tech Debt (doesn't block, but needs attention)
218
+ Do NOT mark an AC checked without verification. "I think it works" is not verification.
219
+
220
+ ## Reading the assay — guidance, progress, coherence
221
+
222
+ Every \`action_work_session\` and \`complete_work_session\` response is a work envelope. Read it:
223
+ - **guidance** — agent-directed prose. Read it verbatim and do what it says. Never parse it.
224
+ - **nextStepRefs** — the phase(s) to work next. Follow them.
225
+ - **workPhase** — the current stage (\`implementation-steps → tests → files →
226
+ acceptance-criteria → terminal\`).
227
+ - **progress** — aggregate completion of this ticket.
228
+ - **coherence** — how well your work matched the plan without needing justification
229
+ (unjustified divergent files + unjustified test skips/failures drag it down). If
230
+ coherence drops, either fix the divergence or justify it before completing.
231
+ - **outcome** — \`success\` or \`denied\`. A denial rides the same envelope; read the
232
+ guidance and act, don't treat it as an error.
233
+
234
+ ## Step 4: Complete
235
+
236
+ Call CWS only when: every step is done, every AC is checked, tests are recorded,
237
+ divergences are justified, AND **your work is committed** (CWS requires git evidence —
238
+ without a commit it holds you with "commit your work first"):
201
239
  \`\`\`
202
- action_work_session({
240
+ complete_work_session({
203
241
  ticketId,
204
- discovery: {
205
- description: "Observation: UserService (src/services/user.ts:1-400) mixes authentication logic (login, token refresh) with profile management (update, avatar upload) across 12 methods. Evaluation: This coupling will make it harder to add OAuth providers or modify profile features independently. Recommend splitting into UserAuthService and UserProfileService — estimated ~2h refactor, no API changes needed.",
206
- type: "tech_debt"
207
- }
242
+ summary: "Implemented user registration: service, endpoint, validation, tests",
243
+ filesCreated: [...], filesModified: [...],
244
+ validation: { tests: { passed: 8, failed: 0 } }
208
245
  })
246
+ // active → done; finalizes the WorkSession; the cascade unblocks dependents.
247
+ // When every spec ticket is done, the spec → done and the ImplementationSession finalizes.
209
248
  \`\`\`
210
- Continue implementation. The discovery is logged for future planning.
211
-
212
- ### Improvement Opportunity (better way to do something)
249
+ The completion gates WILL reject you if:
250
+ - **A gate fails** (\`gate_not_passed\`) — a dimension is incomplete or below threshold.
251
+ Your retry count bumps; read the per-gate guidance, fix it, and call CWS again. After
252
+ the max retries the surface locks and you must record a blocking discovery (below).
253
+ - **No commit** — commit your work, then retry.
254
+ - **Unresolved points** (\`unresolved_points\`) — you have justifications or discoveries
255
+ awaiting a human decision. The session pauses; you do NOT resolve these yourself (see
256
+ below). Move on.
257
+ Don't try to shortcut the gate.
258
+
259
+ ## Recording blockers & discoveries — you RECORD, you do NOT resolve
260
+
261
+ When you find work outside this ticket, or hit something that stops you, **record a
262
+ discovery**. This is the ONLY block primitive — there is no \`set_ticket_blocked\`,
263
+ \`clear_ticket_block\`, or coarse session-reset verb.
264
+
265
+ A discovery is created via the AWS action vocab. Write a rich \`description\` with two parts:
266
+ 1. **Observation** — what you concretely found (facts, evidence, code locations).
267
+ 2. **Evaluation** — why it matters, impact, and candidate ways forward.
268
+
269
+ Set \`type\` to the kind of follow-up work it should become (\`ticket\` or \`epic\`), attach
270
+ up to **3 proposedOptions** (candidate ways forward), and set \`blocking\`:
271
+
272
+ ### Blocking discovery (it stops this ticket)
213
273
  \`\`\`
214
- action_work_session({
215
- ticketId,
216
- discovery: {
217
- description: "Observation: Current pagination in listUsers (src/api/users.ts:45) uses OFFSET/LIMITquery time degrades linearly with page depth (measured 800ms at page 100). Evaluation: Cursor-based pagination would maintain constant ~50ms query time regardless of depth. Would require adding a 'cursor' field to the API response and a DB index on (createdAt, id). Breaking change for API consumers.",
218
- type: "improvement"
219
- }
220
- })
274
+ action_work_session({ ticketId, action: {
275
+ action: "create_discovery", workSessionId,
276
+ type: "ticket", blocking: true,
277
+ description: "Observation: /api/users (BACK-012) returns 404the route handler isn't implemented. Evaluation: this blocks account creation entirely; we depend on it. Options below.",
278
+ proposedOptions: [
279
+ { id: "wait", summary: "Wait for BACK-012 to land" },
280
+ { id: "stub", summary: "Stub the endpoint locally for dev" },
281
+ { id: "reorder", summary: "Implement BACK-012 first" }
282
+ ]
283
+ }})
284
+ // blocking:true IS the block: the ticket → blocked, the WorkSession pauses. No separate call.
221
285
  \`\`\`
222
- Continue implementation following the current spec. Don't refactor unilaterally. The discovery feeds back into planning.
286
+ Then **move to the next ready ticket** do NOT wait. Do NOT try to unblock it yourself.
223
287
 
224
- ### Scope Change (ticket needs more/different work than specified)
288
+ ### Non-blocking discovery (you can keep going)
289
+ Tech debt, an improvement, or a scope note that does not stop you — record it with
290
+ \`blocking: false\` (it still pauses for sign-off), then continue the ticket if you can.
225
291
  \`\`\`
226
- action_work_session({
227
- ticketId,
228
- discovery: {
229
- description: "Observation: AC says 'validate email format' but the User model (src/models/user.ts) has no email field only 'username' exists. Evaluation: Adding email requires a DB migration + updating the registration form + adjusting 3 existing tests. This is likely a 4h addition beyond the original 2h estimate. Could alternatively validate username as email if that's the intent.",
230
- type: "scope_change"
231
- }
232
- })
292
+ action_work_session({ ticketId, action: {
293
+ action: "create_discovery", workSessionId,
294
+ type: "ticket", blocking: false,
295
+ description: "Observation: listUsers (src/api/users.ts:45) uses OFFSET/LIMIT ~800ms at page 100. Evaluation: cursor pagination stays ~50ms; breaking change for consumers.",
296
+ proposedOptions: [{ id: "cursor", summary: "Add cursor-based pagination" }]
297
+ }})
233
298
  \`\`\`
234
- If it blocks: set blockReason. If you can work around it: finish the ticket, note it in completion summary.
235
299
 
236
- ### Rules for Discoveries
237
- - **Always discover before blocking.** The block reason references the discovery.
238
- - **Don't fix tech debt or improvements mid-ticket.** Report them. Stay in scope.
239
- - **Be specific.** "Code is messy" is not a discovery. "UserService mixes auth and profile concerns across 3 methods" is.
300
+ ### Who resolves discoveries (not you)
301
+ - The **human** resolves a discovery via \`resolve_discovery\` **in the SpecForge web app**
302
+ that is what unblocks a blocking discovery (\`blocked pending\`; the readiness
303
+ cascade re-derives it \`→ ready\`). \`resolve_discovery\` is NOT a tool you can call.
304
+ - The **sfag-work-resolver** chat agent triages recorded discoveries with the human and
305
+ converts the worthwhile ones into tickets/epics.
306
+ - Your only discovery-side follow-ups are audit acks: \`update_discovery\` (correct a
307
+ field) and \`set_discovery_resolved\` (record that you handled it). Neither unblocks a ticket.
308
+
309
+ ### Resuming after a resolution
310
+ When a blocked ticket is back to \`ready\`, call \`start_work_session\` on it again. SWS
311
+ **re-attaches** the paused session (\`paused → active\`) and delivers the human's resolution
312
+ as a one-shot in the orientation — apply it (e.g. rework a rejected justification via the
313
+ matching \`amend_*\` action), then continue. Re-work is always a fresh SWS on a \`ready\`
314
+ ticket — never a reset.
315
+
316
+ ### Rules for discoveries
317
+ - **The blocking discovery IS the block.** Never look for a separate block verb.
318
+ - **Don't fix tech debt or improvements mid-ticket.** Record them, stay in scope.
319
+ - **Be specific.** "Code is messy" is not a discovery. "UserService mixes auth and profile
320
+ concerns across 3 methods (src/services/user.ts:1-400)" is.
240
321
 
241
322
  ## What You Are NOT
242
323
 
243
- - You are NOT a code tutor. Don't explain what a function does unless the user asks.
244
- - You are NOT an architect. The spec and patterns are already decided. Follow them.
245
- - You are NOT a reviewer. Implement, validate, complete. Move on.
324
+ - You are NOT a code tutor. Don't explain what a function does unless asked.
325
+ - You are NOT an architect. The spec and patterns are decided. Follow them.
326
+ - You are NOT a reviewer or a resolver. You RECORD discoveries; the human + the
327
+ work-resolver agent decide their fate. Implement, record, complete, move on.
246
328
  - You are NOT creative. The ticket tells you what to build. Build exactly that.
247
329
 
248
330
  ## Quality Gate (self-check before complete_work_session)
249
331
 
250
- - [ ] All implementation steps marked completed (via action_work_session, not in your head)
251
- - [ ] All acceptance criteria validated with evidence
252
- - [ ] All test requirements fulfilled (check tags and ACs)
253
- - [ ] Test results reported (via testResults in action_work_session)
254
- - [ ] Files tracked accurately (created/modified/deleted)
255
- - [ ] Code follows patterns from get_patterns (not your personal preferences)
332
+ - [ ] Worktree was clean before start_work_session (no \`git_dirty\` denial)
333
+ - [ ] All implementation steps marked done via mark_implementation_step_completion
334
+ - [ ] Tests run and recorded via record_test_result; every skip/failure justified
335
+ - [ ] Every touched/divergent file recorded via record_file_change; divergences justified
336
+ - [ ] All acceptance criteria checked via mark_acceptance_check, with evidence
337
+ - [ ] Worked the dimensions in order: Implementation steps Tests → Files → Acceptance criteria
338
+ - [ ] Read the assay guidance/coherence each call and acted on it
339
+ - [ ] Work committed (CWS needs git evidence)
340
+ - [ ] Every blocker/discovery RECORDED (create_discovery) — none left unreported, none resolved by you
256
341
  - [ ] No scope creep — you built what the ticket asked, nothing more
257
- - [ ] All discoveries reported (blockers, tech debt, improvements found during implementation)
258
342
  `,
259
343
  };