@g3nomaly/skills 1.0.0 → 1.0.1

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 (384) hide show
  1. package/dist/cli/adapter.d.ts +19 -16
  2. package/dist/cli/adapter.d.ts.map +1 -1
  3. package/dist/cli/adapter.js +39 -63
  4. package/dist/cli/adapter.js.map +1 -1
  5. package/dist/cli/commands/add.d.ts +7 -10
  6. package/dist/cli/commands/add.d.ts.map +1 -1
  7. package/dist/cli/commands/add.js +12 -98
  8. package/dist/cli/commands/add.js.map +1 -1
  9. package/dist/cli/commands/ls.d.ts +9 -2
  10. package/dist/cli/commands/ls.d.ts.map +1 -1
  11. package/dist/cli/commands/ls.js +21 -5
  12. package/dist/cli/commands/ls.js.map +1 -1
  13. package/dist/cli/commands/remove.d.ts +7 -7
  14. package/dist/cli/commands/remove.d.ts.map +1 -1
  15. package/dist/cli/commands/remove.js +11 -56
  16. package/dist/cli/commands/remove.js.map +1 -1
  17. package/dist/cli/commands/source.d.ts +29 -0
  18. package/dist/cli/commands/source.d.ts.map +1 -0
  19. package/dist/cli/commands/source.js +31 -0
  20. package/dist/cli/commands/source.js.map +1 -0
  21. package/dist/cli/commands/update.d.ts +6 -6
  22. package/dist/cli/commands/update.d.ts.map +1 -1
  23. package/dist/cli/commands/update.js +9 -43
  24. package/dist/cli/commands/update.js.map +1 -1
  25. package/dist/cli/index.js +79 -58
  26. package/dist/cli/index.js.map +1 -1
  27. package/dist/index.d.ts +2 -8
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +2 -8
  30. package/dist/index.js.map +1 -1
  31. package/dist/packages/index.d.ts +3 -0
  32. package/dist/packages/index.d.ts.map +1 -0
  33. package/dist/packages/index.js +3 -0
  34. package/dist/packages/index.js.map +1 -0
  35. package/dist/packages/install.d.ts +24 -0
  36. package/dist/packages/install.d.ts.map +1 -0
  37. package/dist/packages/install.js +47 -0
  38. package/dist/packages/install.js.map +1 -0
  39. package/dist/registry/index.d.ts +4 -2
  40. package/dist/registry/index.d.ts.map +1 -1
  41. package/dist/registry/index.js +3 -2
  42. package/dist/registry/index.js.map +1 -1
  43. package/dist/registry/locate.d.ts +22 -0
  44. package/dist/registry/locate.d.ts.map +1 -0
  45. package/dist/registry/locate.js +81 -0
  46. package/dist/registry/locate.js.map +1 -0
  47. package/dist/registry/manifest.d.ts +9 -0
  48. package/dist/registry/manifest.d.ts.map +1 -0
  49. package/dist/registry/manifest.js +14 -0
  50. package/dist/registry/manifest.js.map +1 -0
  51. package/dist/registry/readSkillDir.d.ts +8 -6
  52. package/dist/registry/readSkillDir.d.ts.map +1 -1
  53. package/dist/registry/readSkillDir.js +19 -24
  54. package/dist/registry/readSkillDir.js.map +1 -1
  55. package/dist/registry/readSource.d.ts +9 -0
  56. package/dist/registry/readSource.d.ts.map +1 -0
  57. package/dist/registry/readSource.js +30 -0
  58. package/dist/registry/readSource.js.map +1 -0
  59. package/dist/registry/types.d.ts +16 -16
  60. package/dist/registry/types.d.ts.map +1 -1
  61. package/dist/registry/types.js +13 -23
  62. package/dist/registry/types.js.map +1 -1
  63. package/dist/sources/builtins.d.ts +4 -0
  64. package/dist/sources/builtins.d.ts.map +1 -0
  65. package/dist/sources/builtins.js +5 -0
  66. package/dist/sources/builtins.js.map +1 -0
  67. package/dist/sources/index.d.ts +2 -0
  68. package/dist/sources/index.d.ts.map +1 -0
  69. package/dist/sources/index.js +3 -0
  70. package/dist/sources/index.js.map +1 -0
  71. package/dist/utils/frontmatter.d.ts +7 -0
  72. package/dist/utils/frontmatter.d.ts.map +1 -0
  73. package/dist/utils/frontmatter.js +20 -0
  74. package/dist/utils/frontmatter.js.map +1 -0
  75. package/dist/utils/index.d.ts +2 -0
  76. package/dist/utils/index.d.ts.map +1 -0
  77. package/dist/utils/index.js +3 -0
  78. package/dist/utils/index.js.map +1 -0
  79. package/package.json +8 -32
  80. package/dist/cli/commands/hook.d.ts +0 -6
  81. package/dist/cli/commands/hook.d.ts.map +0 -1
  82. package/dist/cli/commands/hook.js +0 -18
  83. package/dist/cli/commands/hook.js.map +0 -1
  84. package/dist/decisions/index.d.ts +0 -6
  85. package/dist/decisions/index.d.ts.map +0 -1
  86. package/dist/decisions/index.js +0 -5
  87. package/dist/decisions/index.js.map +0 -1
  88. package/dist/decisions/paths.d.ts +0 -4
  89. package/dist/decisions/paths.d.ts.map +0 -1
  90. package/dist/decisions/paths.js +0 -12
  91. package/dist/decisions/paths.js.map +0 -1
  92. package/dist/decisions/read.d.ts +0 -18
  93. package/dist/decisions/read.d.ts.map +0 -1
  94. package/dist/decisions/read.js +0 -45
  95. package/dist/decisions/read.js.map +0 -1
  96. package/dist/decisions/write.d.ts +0 -20
  97. package/dist/decisions/write.d.ts.map +0 -1
  98. package/dist/decisions/write.js +0 -48
  99. package/dist/decisions/write.js.map +0 -1
  100. package/dist/filetree/ensure.d.ts +0 -7
  101. package/dist/filetree/ensure.d.ts.map +0 -1
  102. package/dist/filetree/ensure.js +0 -36
  103. package/dist/filetree/ensure.js.map +0 -1
  104. package/dist/filetree/entries.d.ts +0 -9
  105. package/dist/filetree/entries.d.ts.map +0 -1
  106. package/dist/filetree/entries.js +0 -49
  107. package/dist/filetree/entries.js.map +0 -1
  108. package/dist/filetree/frontmatter.d.ts +0 -16
  109. package/dist/filetree/frontmatter.d.ts.map +0 -1
  110. package/dist/filetree/frontmatter.js +0 -43
  111. package/dist/filetree/frontmatter.js.map +0 -1
  112. package/dist/filetree/generate.d.ts +0 -16
  113. package/dist/filetree/generate.d.ts.map +0 -1
  114. package/dist/filetree/generate.js +0 -62
  115. package/dist/filetree/generate.js.map +0 -1
  116. package/dist/filetree/index.d.ts +0 -17
  117. package/dist/filetree/index.d.ts.map +0 -1
  118. package/dist/filetree/index.js +0 -13
  119. package/dist/filetree/index.js.map +0 -1
  120. package/dist/filetree/levels.d.ts +0 -25
  121. package/dist/filetree/levels.d.ts.map +0 -1
  122. package/dist/filetree/levels.js +0 -45
  123. package/dist/filetree/levels.js.map +0 -1
  124. package/dist/filetree/locate.d.ts +0 -44
  125. package/dist/filetree/locate.d.ts.map +0 -1
  126. package/dist/filetree/locate.js +0 -76
  127. package/dist/filetree/locate.js.map +0 -1
  128. package/dist/filetree/paths.d.ts +0 -15
  129. package/dist/filetree/paths.d.ts.map +0 -1
  130. package/dist/filetree/paths.js +0 -38
  131. package/dist/filetree/paths.js.map +0 -1
  132. package/dist/filetree/read.d.ts +0 -23
  133. package/dist/filetree/read.d.ts.map +0 -1
  134. package/dist/filetree/read.js +0 -36
  135. package/dist/filetree/read.js.map +0 -1
  136. package/dist/filetree/remove.d.ts +0 -9
  137. package/dist/filetree/remove.d.ts.map +0 -1
  138. package/dist/filetree/remove.js +0 -17
  139. package/dist/filetree/remove.js.map +0 -1
  140. package/dist/filetree/root.d.ts +0 -9
  141. package/dist/filetree/root.d.ts.map +0 -1
  142. package/dist/filetree/root.js +0 -15
  143. package/dist/filetree/root.js.map +0 -1
  144. package/dist/filetree/status.d.ts +0 -21
  145. package/dist/filetree/status.d.ts.map +0 -1
  146. package/dist/filetree/status.js +0 -55
  147. package/dist/filetree/status.js.map +0 -1
  148. package/dist/hooks/cli.d.ts +0 -29
  149. package/dist/hooks/cli.d.ts.map +0 -1
  150. package/dist/hooks/cli.js +0 -65
  151. package/dist/hooks/cli.js.map +0 -1
  152. package/dist/hooks/index.d.ts +0 -3
  153. package/dist/hooks/index.d.ts.map +0 -1
  154. package/dist/hooks/index.js +0 -3
  155. package/dist/hooks/index.js.map +0 -1
  156. package/dist/plugins/grilling/.claude-plugin/plugin.json +0 -7
  157. package/dist/plugins/grilling/skills/domain-modeling/ADR-FORMAT.md +0 -47
  158. package/dist/plugins/grilling/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  159. package/dist/plugins/grilling/skills/domain-modeling/SKILL.md +0 -74
  160. package/dist/plugins/grilling/skills/domain-modeling/agents/openai.yaml +0 -3
  161. package/dist/plugins/grilling/skills/grill-me/SKILL.md +0 -7
  162. package/dist/plugins/grilling/skills/grill-me/agents/openai.yaml +0 -5
  163. package/dist/plugins/grilling/skills/grill-with-docs/SKILL.md +0 -7
  164. package/dist/plugins/grilling/skills/grill-with-docs/agents/openai.yaml +0 -5
  165. package/dist/plugins/grilling/skills/grilling/SKILL.md +0 -12
  166. package/dist/plugins/grilling/skills/grilling/agents/openai.yaml +0 -3
  167. package/dist/plugins/speech/.claude-plugin/plugin.json +0 -7
  168. package/dist/plugins/speech/skills/emphasise/SKILL.md +0 -49
  169. package/dist/plugins/speech/skills/emphasise/agents/openai.yaml +0 -5
  170. package/dist/plugins/speech/skills/unslop/SKILL.md +0 -80
  171. package/dist/plugins/task-manager/.claude-plugin/plugin.json +0 -11
  172. package/dist/plugins/task-manager/hooks/hooks.json +0 -19
  173. package/dist/plugins/task-manager/skills/decisions/SKILL.md +0 -39
  174. package/dist/plugins/task-manager/skills/decisions/agents/openai.yaml +0 -5
  175. package/dist/plugins/task-manager/skills/decisions/references/usage.md +0 -26
  176. package/dist/plugins/task-manager/skills/task-manager/SKILL.md +0 -99
  177. package/dist/plugins/task-manager/skills/vocabulary/SKILL.md +0 -42
  178. package/dist/plugins/task-manager/skills/vocabulary/agents/openai.yaml +0 -5
  179. package/dist/plugins/task-manager/skills/vocabulary/references/usage.md +0 -26
  180. package/dist/plugins/using-hooks/.claude-plugin/plugin.json +0 -7
  181. package/dist/plugins/using-hooks/skills/hook-post-tool-use/SKILL.md +0 -79
  182. package/dist/plugins/using-hooks/skills/hook-post-tool-use/agents/openai.yaml +0 -5
  183. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/SKILL.md +0 -84
  184. package/dist/plugins/using-hooks/skills/hook-pre-tool-use/agents/openai.yaml +0 -5
  185. package/dist/plugins/using-hooks/skills/hook-stop/SKILL.md +0 -69
  186. package/dist/plugins/using-hooks/skills/hook-stop/agents/openai.yaml +0 -5
  187. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/SKILL.md +0 -64
  188. package/dist/plugins/using-hooks/skills/hook-user-prompt-submit/agents/openai.yaml +0 -5
  189. package/dist/plugins/workflow/.claude-plugin/plugin.json +0 -16
  190. package/dist/plugins/workflow/agents/reviewer.md +0 -9
  191. package/dist/plugins/workflow/skills/execute/SKILL.md +0 -21
  192. package/dist/plugins/workflow/skills/execute/agents/openai.yaml +0 -5
  193. package/dist/plugins/workflow/skills/orchestrator/SKILL.md +0 -27
  194. package/dist/plugins/workflow/skills/orchestrator/agents/openai.yaml +0 -5
  195. package/dist/plugins/workflow/skills/plan/SKILL.md +0 -18
  196. package/dist/plugins/workflow/skills/plan/agents/openai.yaml +0 -5
  197. package/dist/plugins/workflow/skills/plan/references/task-frontmatter.md +0 -33
  198. package/dist/plugins/workflow/skills/review/SKILL.md +0 -25
  199. package/dist/plugins/workflow/skills/review/agents/openai.yaml +0 -5
  200. package/dist/plugins/workflow/skills/run/SKILL.md +0 -33
  201. package/dist/plugins/workflow/skills/run/agents/openai.yaml +0 -5
  202. package/dist/plugins/workflow/skills/run/references/sub-agents.md +0 -46
  203. package/dist/plugins/workflow/skills/sync/SKILL.md +0 -18
  204. package/dist/plugins/workflow/skills/sync/agents/openai.yaml +0 -5
  205. package/dist/plugins/workflow/skills/worktree/SKILL.md +0 -38
  206. package/dist/plugins/workflow/skills/worktree/agents/openai.yaml +0 -5
  207. package/dist/plugins/workflow/skills/worktree/references/git-commands.md +0 -27
  208. package/dist/plugins/writing/.claude-plugin/plugin.json +0 -7
  209. package/dist/plugins/writing/skills/writing-great-hooks/SKILL.md +0 -192
  210. package/dist/plugins/writing/skills/writing-great-hooks/agents/openai.yaml +0 -5
  211. package/dist/plugins/writing/skills/writing-great-skills/GLOSSARY.md +0 -201
  212. package/dist/plugins/writing/skills/writing-great-skills/SKILL.md +0 -92
  213. package/dist/plugins/writing/skills/writing-great-skills/agents/openai.yaml +0 -5
  214. package/dist/plugins/writing/skills/writing-great-tasks/SKILL.md +0 -136
  215. package/dist/plugins/writing/skills/writing-great-tasks/agents/openai.yaml +0 -5
  216. package/dist/plugins/writing/skills/writing-great-tasks/templates/template_task.md +0 -108
  217. package/dist/registry/loadPackageRegistry.d.ts +0 -14
  218. package/dist/registry/loadPackageRegistry.d.ts.map +0 -1
  219. package/dist/registry/loadPackageRegistry.js +0 -59
  220. package/dist/registry/loadPackageRegistry.js.map +0 -1
  221. package/dist/registry/userManifest.d.ts +0 -7
  222. package/dist/registry/userManifest.d.ts.map +0 -1
  223. package/dist/registry/userManifest.js +0 -21
  224. package/dist/registry/userManifest.js.map +0 -1
  225. package/dist/remote/fetch.d.ts +0 -16
  226. package/dist/remote/fetch.d.ts.map +0 -1
  227. package/dist/remote/fetch.js +0 -41
  228. package/dist/remote/fetch.js.map +0 -1
  229. package/dist/remote/index.d.ts +0 -7
  230. package/dist/remote/index.d.ts.map +0 -1
  231. package/dist/remote/index.js +0 -5
  232. package/dist/remote/index.js.map +0 -1
  233. package/dist/remote/manifest.d.ts +0 -23
  234. package/dist/remote/manifest.d.ts.map +0 -1
  235. package/dist/remote/manifest.js +0 -116
  236. package/dist/remote/manifest.js.map +0 -1
  237. package/dist/remote/registry.d.ts +0 -18
  238. package/dist/remote/registry.d.ts.map +0 -1
  239. package/dist/remote/registry.js +0 -58
  240. package/dist/remote/registry.js.map +0 -1
  241. package/dist/schemas/config.d.ts +0 -3
  242. package/dist/schemas/config.d.ts.map +0 -1
  243. package/dist/schemas/config.js +0 -3
  244. package/dist/schemas/config.js.map +0 -1
  245. package/dist/schemas/decision.d.ts +0 -43
  246. package/dist/schemas/decision.d.ts.map +0 -1
  247. package/dist/schemas/decision.js +0 -24
  248. package/dist/schemas/decision.js.map +0 -1
  249. package/dist/schemas/index.d.ts +0 -17
  250. package/dist/schemas/index.d.ts.map +0 -1
  251. package/dist/schemas/index.js +0 -10
  252. package/dist/schemas/index.js.map +0 -1
  253. package/dist/schemas/phase.d.ts +0 -46
  254. package/dist/schemas/phase.d.ts.map +0 -1
  255. package/dist/schemas/phase.js +0 -16
  256. package/dist/schemas/phase.js.map +0 -1
  257. package/dist/schemas/plan.d.ts +0 -44
  258. package/dist/schemas/plan.d.ts.map +0 -1
  259. package/dist/schemas/plan.js +0 -15
  260. package/dist/schemas/plan.js.map +0 -1
  261. package/dist/schemas/primitives.d.ts +0 -38
  262. package/dist/schemas/primitives.d.ts.map +0 -1
  263. package/dist/schemas/primitives.js +0 -33
  264. package/dist/schemas/primitives.js.map +0 -1
  265. package/dist/schemas/task.d.ts +0 -70
  266. package/dist/schemas/task.d.ts.map +0 -1
  267. package/dist/schemas/task.js +0 -19
  268. package/dist/schemas/task.js.map +0 -1
  269. package/dist/schemas/term.d.ts +0 -17
  270. package/dist/schemas/term.d.ts.map +0 -1
  271. package/dist/schemas/term.js +0 -22
  272. package/dist/schemas/term.js.map +0 -1
  273. package/dist/schemas/validation.d.ts +0 -24
  274. package/dist/schemas/validation.d.ts.map +0 -1
  275. package/dist/schemas/validation.js +0 -39
  276. package/dist/schemas/validation.js.map +0 -1
  277. package/dist/task-manager/hooks/add-decision.d.ts +0 -2
  278. package/dist/task-manager/hooks/add-decision.d.ts.map +0 -1
  279. package/dist/task-manager/hooks/add-decision.js +0 -19
  280. package/dist/task-manager/hooks/add-decision.js.map +0 -1
  281. package/dist/task-manager/hooks/cleanup.d.ts +0 -2
  282. package/dist/task-manager/hooks/cleanup.d.ts.map +0 -1
  283. package/dist/task-manager/hooks/cleanup.js +0 -27
  284. package/dist/task-manager/hooks/cleanup.js.map +0 -1
  285. package/dist/task-manager/hooks/get-decision.d.ts +0 -2
  286. package/dist/task-manager/hooks/get-decision.d.ts.map +0 -1
  287. package/dist/task-manager/hooks/get-decision.js +0 -11
  288. package/dist/task-manager/hooks/get-decision.js.map +0 -1
  289. package/dist/task-manager/hooks/get-entry.d.ts +0 -2
  290. package/dist/task-manager/hooks/get-entry.d.ts.map +0 -1
  291. package/dist/task-manager/hooks/get-entry.js +0 -20
  292. package/dist/task-manager/hooks/get-entry.js.map +0 -1
  293. package/dist/task-manager/hooks/get-term.d.ts +0 -2
  294. package/dist/task-manager/hooks/get-term.d.ts.map +0 -1
  295. package/dist/task-manager/hooks/get-term.js +0 -13
  296. package/dist/task-manager/hooks/get-term.js.map +0 -1
  297. package/dist/task-manager/hooks/guard-tree.d.ts +0 -2
  298. package/dist/task-manager/hooks/guard-tree.d.ts.map +0 -1
  299. package/dist/task-manager/hooks/guard-tree.js +0 -63
  300. package/dist/task-manager/hooks/guard-tree.js.map +0 -1
  301. package/dist/task-manager/hooks/index.d.ts +0 -4
  302. package/dist/task-manager/hooks/index.d.ts.map +0 -1
  303. package/dist/task-manager/hooks/index.js +0 -32
  304. package/dist/task-manager/hooks/index.js.map +0 -1
  305. package/dist/task-manager/hooks/list-decisions.d.ts +0 -2
  306. package/dist/task-manager/hooks/list-decisions.d.ts.map +0 -1
  307. package/dist/task-manager/hooks/list-decisions.js +0 -20
  308. package/dist/task-manager/hooks/list-decisions.js.map +0 -1
  309. package/dist/task-manager/hooks/list-entries.d.ts +0 -2
  310. package/dist/task-manager/hooks/list-entries.d.ts.map +0 -1
  311. package/dist/task-manager/hooks/list-entries.js +0 -19
  312. package/dist/task-manager/hooks/list-entries.js.map +0 -1
  313. package/dist/task-manager/hooks/list-terms.d.ts +0 -2
  314. package/dist/task-manager/hooks/list-terms.d.ts.map +0 -1
  315. package/dist/task-manager/hooks/list-terms.js +0 -8
  316. package/dist/task-manager/hooks/list-terms.js.map +0 -1
  317. package/dist/task-manager/hooks/next-entry.d.ts +0 -2
  318. package/dist/task-manager/hooks/next-entry.d.ts.map +0 -1
  319. package/dist/task-manager/hooks/next-entry.js +0 -23
  320. package/dist/task-manager/hooks/next-entry.js.map +0 -1
  321. package/dist/task-manager/hooks/remove-term.d.ts +0 -2
  322. package/dist/task-manager/hooks/remove-term.d.ts.map +0 -1
  323. package/dist/task-manager/hooks/remove-term.js +0 -15
  324. package/dist/task-manager/hooks/remove-term.js.map +0 -1
  325. package/dist/task-manager/hooks/set-state.d.ts +0 -2
  326. package/dist/task-manager/hooks/set-state.d.ts.map +0 -1
  327. package/dist/task-manager/hooks/set-state.js +0 -15
  328. package/dist/task-manager/hooks/set-state.js.map +0 -1
  329. package/dist/task-manager/hooks/set-term.d.ts +0 -2
  330. package/dist/task-manager/hooks/set-term.d.ts.map +0 -1
  331. package/dist/task-manager/hooks/set-term.js +0 -27
  332. package/dist/task-manager/hooks/set-term.js.map +0 -1
  333. package/dist/task-manager/hooks/sync-tree.d.ts +0 -2
  334. package/dist/task-manager/hooks/sync-tree.d.ts.map +0 -1
  335. package/dist/task-manager/hooks/sync-tree.js +0 -28
  336. package/dist/task-manager/hooks/sync-tree.js.map +0 -1
  337. package/dist/task-manager/index.d.ts +0 -2
  338. package/dist/task-manager/index.d.ts.map +0 -1
  339. package/dist/task-manager/index.js +0 -3
  340. package/dist/task-manager/index.js.map +0 -1
  341. package/dist/vocabulary/file.d.ts +0 -15
  342. package/dist/vocabulary/file.d.ts.map +0 -1
  343. package/dist/vocabulary/file.js +0 -80
  344. package/dist/vocabulary/file.js.map +0 -1
  345. package/dist/vocabulary/index.d.ts +0 -4
  346. package/dist/vocabulary/index.d.ts.map +0 -1
  347. package/dist/vocabulary/index.js +0 -4
  348. package/dist/vocabulary/index.js.map +0 -1
  349. package/dist/vocabulary/match.d.ts +0 -22
  350. package/dist/vocabulary/match.d.ts.map +0 -1
  351. package/dist/vocabulary/match.js +0 -31
  352. package/dist/vocabulary/match.js.map +0 -1
  353. package/dist/workflow/gates.d.ts +0 -24
  354. package/dist/workflow/gates.d.ts.map +0 -1
  355. package/dist/workflow/gates.js +0 -34
  356. package/dist/workflow/gates.js.map +0 -1
  357. package/dist/workflow/hooks/advance-step.d.ts +0 -2
  358. package/dist/workflow/hooks/advance-step.d.ts.map +0 -1
  359. package/dist/workflow/hooks/advance-step.js +0 -51
  360. package/dist/workflow/hooks/advance-step.js.map +0 -1
  361. package/dist/workflow/hooks/current-step.d.ts +0 -2
  362. package/dist/workflow/hooks/current-step.d.ts.map +0 -1
  363. package/dist/workflow/hooks/current-step.js +0 -24
  364. package/dist/workflow/hooks/current-step.js.map +0 -1
  365. package/dist/workflow/hooks/index.d.ts +0 -4
  366. package/dist/workflow/hooks/index.d.ts.map +0 -1
  367. package/dist/workflow/hooks/index.js +0 -10
  368. package/dist/workflow/hooks/index.js.map +0 -1
  369. package/dist/workflow/hooks/ready-phases.d.ts +0 -2
  370. package/dist/workflow/hooks/ready-phases.d.ts.map +0 -1
  371. package/dist/workflow/hooks/ready-phases.js +0 -15
  372. package/dist/workflow/hooks/ready-phases.js.map +0 -1
  373. package/dist/workflow/index.d.ts +0 -8
  374. package/dist/workflow/index.d.ts.map +0 -1
  375. package/dist/workflow/index.js +0 -6
  376. package/dist/workflow/index.js.map +0 -1
  377. package/dist/workflow/phase.d.ts +0 -16
  378. package/dist/workflow/phase.d.ts.map +0 -1
  379. package/dist/workflow/phase.js +0 -22
  380. package/dist/workflow/phase.js.map +0 -1
  381. package/dist/workflow/steps.d.ts +0 -15
  382. package/dist/workflow/steps.d.ts.map +0 -1
  383. package/dist/workflow/steps.js +0 -32
  384. package/dist/workflow/steps.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"sync-tree.js","sourceRoot":"","sources":["../../../src/task-manager/hooks/sync-tree.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpD,8EAA8E;AAC9E,KAAK,UAAU,kBAAkB;IAC/B,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAE1C,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;IACnC,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAExC,MAAM,OAAO,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzC,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAEtE,MAAM,GAAG,GAAI,OAAmC,CAAC,GAAG,CAAC;IAErD,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,MAAyB;IACjD,MAAM,IAAI,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC;IAEzB,IAAI,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,KAAK,SAAS,IAAI,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,SAAS,EAAE,CAAC;QACxF,MAAM,OAAO,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAC3C,IAAI,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;IAErC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;IACvB,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC"}
@@ -1,2 +0,0 @@
1
- export { TASK_MANAGER_HOOKS } from "./hooks";
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task-manager/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,3 +0,0 @@
1
- // packages/skills/src/task-manager/index.ts
2
- export { TASK_MANAGER_HOOKS } from "./hooks";
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/task-manager/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
@@ -1,15 +0,0 @@
1
- import { type Term } from "../schemas/term";
2
- /** File at the tree root holding every term. Written by the term hooks only. */
3
- export declare const VOCABULARY_FILE = "vocabulary.md";
4
- export declare function vocabularyPathFor(root: string): string;
5
- /**
6
- * Every term of the tree at `root`, in the order they sit in the file. A tree
7
- * with no vocabulary file yet has no terms.
8
- *
9
- * @throws FileValidationError when the file strays from the layout
10
- * `writeVocabulary` produces, or names one term twice
11
- */
12
- export declare function readVocabulary(root: string): Promise<Term[]>;
13
- /** Replaces the vocabulary file with `terms`, sorted by name so the file reads the same on every write. */
14
- export declare function writeVocabulary(root: string, terms: readonly Term[]): Promise<void>;
15
- //# sourceMappingURL=file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/vocabulary/file.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9D,gFAAgF;AAChF,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAM/C,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAQlE;AAED,2GAA2G;AAC3G,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAUzF"}
@@ -1,80 +0,0 @@
1
- // packages/skills/src/vocabulary/file.ts
2
- import { join } from "node:path";
3
- import { FileValidationError, parseFile } from "../schemas/validation";
4
- import { VocabularySchema } from "../schemas/term";
5
- /** File at the tree root holding every term. Written by the term hooks only. */
6
- export const VOCABULARY_FILE = "vocabulary.md";
7
- const TITLE = "# Vocabulary";
8
- const TERM_HEADING = "## ";
9
- const AVOID_PREFIX = "_Avoid_:";
10
- export function vocabularyPathFor(root) {
11
- return join(root, VOCABULARY_FILE);
12
- }
13
- /**
14
- * Every term of the tree at `root`, in the order they sit in the file. A tree
15
- * with no vocabulary file yet has no terms.
16
- *
17
- * @throws FileValidationError when the file strays from the layout
18
- * `writeVocabulary` produces, or names one term twice
19
- */
20
- export async function readVocabulary(root) {
21
- const file = vocabularyPathFor(root);
22
- if (!(await Bun.file(file).exists()))
23
- return [];
24
- const terms = parseFile(VocabularySchema, file, { terms: parseTerms(file, await Bun.file(file).text()) }).terms;
25
- rejectDuplicates(file, terms);
26
- return terms;
27
- }
28
- /** Replaces the vocabulary file with `terms`, sorted by name so the file reads the same on every write. */
29
- export async function writeVocabulary(root, terms) {
30
- const file = vocabularyPathFor(root);
31
- const validated = parseFile(VocabularySchema, file, { terms }).terms;
32
- rejectDuplicates(file, validated);
33
- const sorted = [...validated].sort((a, b) => a.term.localeCompare(b.term, "en", { sensitivity: "base" }) || a.term.localeCompare(b.term));
34
- await Bun.write(file, `${[TITLE, ...sorted.map(renderTerm)].join("\n\n")}\n`);
35
- }
36
- function renderTerm(term) {
37
- const lines = [`${TERM_HEADING}${term.term}`, "", term.definition.trim()];
38
- if (term.avoid.length > 0)
39
- lines.push("", `${AVOID_PREFIX} ${term.avoid.join(", ")}`);
40
- return lines.join("\n");
41
- }
42
- /** Splits the file at its `## ` headings; the last `_Avoid_:` line of a block is its avoid list. */
43
- function parseTerms(file, text) {
44
- const terms = [];
45
- text.split("\n").forEach((line, index) => {
46
- if (line.startsWith(TERM_HEADING)) {
47
- terms.push({ term: line.slice(TERM_HEADING.length).trim(), lines: [] });
48
- return;
49
- }
50
- const current = terms.at(-1);
51
- if (current !== undefined) {
52
- current.lines.push(line);
53
- return;
54
- }
55
- if (line.trim() !== "" && line.trim() !== TITLE) {
56
- throw new FileValidationError(file, [
57
- { field: `line ${index + 1}`, message: `"${line}" sits above the first ${TERM_HEADING.trim()} heading` },
58
- ]);
59
- }
60
- });
61
- return terms.map(({ term, lines }) => {
62
- const avoidAt = lines.map((line) => line.startsWith(AVOID_PREFIX)).lastIndexOf(true);
63
- const avoid = avoidAt === -1
64
- ? []
65
- : (lines[avoidAt] ?? "").slice(AVOID_PREFIX.length).split(",").map((word) => word.trim()).filter((word) => word !== "");
66
- const definition = lines.filter((_, index) => index !== avoidAt).join("\n").trim();
67
- return { term, definition, avoid };
68
- });
69
- }
70
- function rejectDuplicates(file, terms) {
71
- const seen = new Set();
72
- for (const { term } of terms) {
73
- const key = term.toLowerCase();
74
- if (seen.has(key)) {
75
- throw new FileValidationError(file, [{ field: term, message: "is defined more than once" }]);
76
- }
77
- seen.add(key);
78
- }
79
- }
80
- //# sourceMappingURL=file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/vocabulary/file.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAa,MAAM,iBAAiB,CAAC;AAE9D,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C,MAAM,KAAK,GAAG,cAAc,CAAC;AAC7B,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAY;IAC/C,MAAM,IAAI,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACrC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;Q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B,EAAE,CAAC,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChB,CAAC;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- export { VOCABULARY_FILE, vocabularyPathFor, readVocabulary, writeVocabulary } from "./file";
2
- export { findTerm, termsMentioned } from "./match";
3
- export type { TermMatch, TermMention } from "./match";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vocabulary/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE7F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +0,0 @@
1
- // packages/skills/src/vocabulary/index.ts
2
- export { VOCABULARY_FILE, vocabularyPathFor, readVocabulary, writeVocabulary } from "./file";
3
- export { findTerm, termsMentioned } from "./match";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vocabulary/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE7F,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -1,22 +0,0 @@
1
- import type { Term } from "../schemas/term";
2
- /** A term found by name, and whether the name given was the term itself or a word it replaces. */
3
- export interface TermMatch {
4
- term: Term;
5
- matched: "term" | "avoid";
6
- }
7
- /** A term a text touches, with the exact words that touched it. */
8
- export interface TermMention {
9
- term: string;
10
- definition: string;
11
- /** Avoided words the text uses in place of `term` */
12
- avoided: string[];
13
- }
14
- /** The term answering to `name`, by its own name first and by an avoided word second. */
15
- export declare function findTerm(terms: readonly Term[], name: string): TermMatch | null;
16
- /**
17
- * Terms `text` uses, by name or by an avoided word, in the order of `terms`.
18
- * Attached to an entry by the task-manager hooks so the reader gets each
19
- * definition along with the entry.
20
- */
21
- export declare function termsMentioned(text: string, terms: readonly Term[]): TermMention[];
22
- //# sourceMappingURL=match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../src/vocabulary/match.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,kGAAkG;AAClG,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAMD,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAM/E;AAOD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,IAAI,EAAE,GAAG,WAAW,EAAE,CAWlF"}
@@ -1,31 +0,0 @@
1
- function sameWord(a, b) {
2
- return a.toLowerCase() === b.toLowerCase();
3
- }
4
- /** The term answering to `name`, by its own name first and by an avoided word second. */
5
- export function findTerm(terms, name) {
6
- const own = terms.find((term) => sameWord(term.term, name));
7
- if (own !== undefined)
8
- return { term: own, matched: "term" };
9
- const replaced = terms.find((term) => term.avoid.some((word) => sameWord(word, name)));
10
- return replaced === undefined ? null : { term: replaced, matched: "avoid" };
11
- }
12
- function mentions(text, word) {
13
- const escaped = word.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
14
- return new RegExp(`(?<![\\p{L}\\p{N}])${escaped}(?![\\p{L}\\p{N}])`, "iu").test(text);
15
- }
16
- /**
17
- * Terms `text` uses, by name or by an avoided word, in the order of `terms`.
18
- * Attached to an entry by the task-manager hooks so the reader gets each
19
- * definition along with the entry.
20
- */
21
- export function termsMentioned(text, terms) {
22
- const found = [];
23
- for (const term of terms) {
24
- const avoided = term.avoid.filter((word) => mentions(text, word));
25
- if (avoided.length === 0 && !mentions(text, term.term))
26
- continue;
27
- found.push({ term: term.term, definition: term.definition, avoided });
28
- }
29
- return found;
30
- }
31
- //# sourceMappingURL=match.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"match.js","sourceRoot":"","sources":["../../src/vocabulary/match.ts"],"names":[],"mappings":"AAiBA,SAAS,QAAQ,CAAC,CAAS,EAAE,CAAS;IACpC,OAAO,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7C,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,QAAQ,CAAC,KAAsB,EAAE,IAAY;IAC3D,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAC5D,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;IAE7D,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACvF,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,IAAY;IAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC5D,OAAO,IAAI,MAAM,CAAC,sBAAsB,OAAO,oBAAoB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,KAAsB;IACjE,MAAM,KAAK,GAAkB,EAAE,CAAC;IAEhC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAClE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QAEjE,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,24 +0,0 @@
1
- import type { Phase } from "../schemas";
2
- /** A phase that cannot start yet, and the phases it is waiting for. */
3
- export interface WaitingPhase {
4
- name: string;
5
- waiting_on: string[];
6
- }
7
- /** A plan's phases sorted by whether their gate is open. Every list is in queue order. */
8
- export interface PlanGates {
9
- /** Not finished, not blocked, and every phase it depends on is completed */
10
- ready: Phase[];
11
- waiting: WaitingPhase[];
12
- blocked: string[];
13
- completed: string[];
14
- }
15
- /**
16
- * Sorts a plan's phases by gate. A phase's gate opens once every phase in its
17
- * `depends_on` is completed. Used by the `ready-phases` hook, which the
18
- * orchestrator skill calls between phases.
19
- *
20
- * @param phases every phase of one plan, in queue order
21
- * @throws Error when a phase depends on a name no phase of the plan has
22
- */
23
- export declare function gatesFor(phases: readonly Phase[]): PlanGates;
24
- //# sourceMappingURL=gates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../../src/workflow/gates.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,0FAA0F;AAC1F,MAAM,WAAW,SAAS;IACxB,4EAA4E;IAC5E,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,GAAG,SAAS,CA0B5D"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Sorts a plan's phases by gate. A phase's gate opens once every phase in its
3
- * `depends_on` is completed. Used by the `ready-phases` hook, which the
4
- * orchestrator skill calls between phases.
5
- *
6
- * @param phases every phase of one plan, in queue order
7
- * @throws Error when a phase depends on a name no phase of the plan has
8
- */
9
- export function gatesFor(phases) {
10
- const statusOf = new Map(phases.map((phase) => [phase.name, phase.status]));
11
- const gates = { ready: [], waiting: [], blocked: [], completed: [] };
12
- for (const phase of phases) {
13
- for (const dependency of phase.depends_on) {
14
- if (!statusOf.has(dependency)) {
15
- throw new Error(`phase "${phase.name}" depends on "${dependency}", which is not a phase of this plan`);
16
- }
17
- }
18
- if (phase.status === "completed") {
19
- gates.completed.push(phase.name);
20
- continue;
21
- }
22
- if (phase.status === "blocked") {
23
- gates.blocked.push(phase.name);
24
- continue;
25
- }
26
- const waitingOn = phase.depends_on.filter((dependency) => statusOf.get(dependency) !== "completed");
27
- if (waitingOn.length === 0)
28
- gates.ready.push(phase);
29
- else
30
- gates.waiting.push({ name: phase.name, waiting_on: waitingOn });
31
- }
32
- return gates;
33
- }
34
- //# sourceMappingURL=gates.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gates.js","sourceRoot":"","sources":["../../src/workflow/gates.ts"],"names":[],"mappings":"AAkBA;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAwB;IAC/C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC5E,MAAM,KAAK,GAAc,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAEhF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,KAAK,MAAM,UAAU,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;YAC1C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9B,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,IAAI,iBAAiB,UAAU,sCAAsC,CAAC,CAAC;YACzG,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;YACjC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACjC,SAAS;QACX,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/B,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,WAAW,CAAC,CAAC;QACpG,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;YAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;YAC/C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function run(argv: readonly string[]): Promise<void>;
2
- //# sourceMappingURL=advance-step.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advance-step.d.ts","sourceRoot":"","sources":["../../../src/workflow/hooks/advance-step.ts"],"names":[],"mappings":"AAyCA,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAchE"}
@@ -1,51 +0,0 @@
1
- // packages/skills/src/workflow/hooks/advance-step.ts
2
- import { generateIndex, setEntryStatus } from "../../filetree";
3
- import { oneOf, printJson, requireFlag, resolveRoot } from "../../hooks";
4
- import { readPhaseRun } from "../phase";
5
- import { PHASE_STATUS_AT, STEPS, stepFor } from "../steps";
6
- function idsWith(run, ...statuses) {
7
- return run.tasks.filter((task) => statuses.includes(task.status)).map((task) => task.id).join(", ");
8
- }
9
- /** State the phase moves to once `from` is finished, or a stated reason it is not. */
10
- function stateAfter(run, from) {
11
- const name = run.location.name;
12
- if (run.step === "done")
13
- throw new Error(`"${name}" is already completed`);
14
- if (run.step === "blocked") {
15
- throw new Error(`"${name}" is blocked${run.meta.status === "blocked" ? "" : ` by ${idsWith(run, "blocked")}`}`);
16
- }
17
- if ((run.step === "plan") !== (from === "plan") || (from === "sync" && run.step !== "sync")) {
18
- throw new Error(`"${name}" is on ${run.step}, not ${from}`);
19
- }
20
- switch (from) {
21
- case "plan":
22
- if (run.tasks.length === 0)
23
- throw new Error(`"${name}" has no tasks yet; plan ends once it has at least one`);
24
- return stepFor("in-progress", run.tasks.map((task) => task.status));
25
- case "execute":
26
- if (run.step === "execute") {
27
- throw new Error(`execute is not finished: ${idsWith(run, "open", "in-progress")} still to be worked`);
28
- }
29
- return run.step;
30
- case "review":
31
- if (run.step === "review") {
32
- throw new Error(`review is not finished: ${idsWith(run, "in-review")} still to be completed or sent back`);
33
- }
34
- return run.step;
35
- case "sync":
36
- return "done";
37
- }
38
- }
39
- export async function run(argv) {
40
- const root = await resolveRoot(argv);
41
- const phase = requireFlag(argv, "--phase", "01-schema");
42
- const from = oneOf(requireFlag(argv, "--from", "execute"), STEPS, "--from");
43
- const current = await readPhaseRun(root, phase);
44
- const step = stateAfter(current, from);
45
- const to = PHASE_STATUS_AT[step];
46
- const change = current.meta.status === to ? null : await setEntryStatus(current.location.file, to);
47
- if (change !== null)
48
- await generateIndex(current.location.dir, current.location.level);
49
- printJson({ phase: current.location.name, plan: current.plan, from, step, status: change }, argv);
50
- }
51
- //# sourceMappingURL=advance-step.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advance-step.js","sourceRoot":"","sources":["../../../src/workflow/hooks/advance-step.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,YAAY,EAAiB,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,OAAO,EAA6B,MAAM,UAAU,CAAC;AAEtF,SAAS,OAAO,CAAC,GAAa,EAAE,GAAG,QAAkB;IACnD,OAAO,GA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AO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACnG,IAAI,MAAM,KAAK,IAAI;QAAE,MAAM,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEvF,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC;AACpG,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function run(argv: readonly string[]): Promise<void>;
2
- //# sourceMappingURL=current-step.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"current-step.d.ts","sourceRoot":"","sources":["../../../src/workflow/hooks/current-step.ts"],"names":[],"mappings":"AAgBA,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAehE"}
@@ -1,24 +0,0 @@
1
- import { printJson, requireFlag, resolveRoot } from "../../hooks";
2
- import { readPhaseRun } from "../phase";
3
- /** Task statuses that keep a phase on each state; empty where no task does. */
4
- const HOLDING = {
5
- plan: [],
6
- execute: ["open", "in-progress"],
7
- review: ["in-review"],
8
- sync: [],
9
- done: [],
10
- blocked: ["blocked"],
11
- };
12
- export async function run(argv) {
13
- const root = await resolveRoot(argv);
14
- const { location, plan, meta, tasks, step } = await readPhaseRun(root, requireFlag(argv, "--phase", "01-schema"));
15
- printJson({
16
- phase: location.name,
17
- plan,
18
- step,
19
- status: meta.status,
20
- tasks: tasks.map(({ id, title, status }) => ({ id, title, status })),
21
- holding: tasks.filter((task) => HOLDING[step].includes(task.status)).map((task) => task.id),
22
- }, argv);
23
- }
24
- //# sourceMappingURL=current-step.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"current-step.js","sourceRoot":"","sources":["../../../src/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4 +0,0 @@
1
- import type { Hook } from "../../hooks";
2
- /** Workflow hooks by name, as invoked through `g3n-skills hook <name>`. */
3
- export declare const WORKFLOW_HOOKS: Readonly<Record<string, Hook>>;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workflow/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAKxC,2EAA2E;AAC3E,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAIzD,CAAC"}
@@ -1,10 +0,0 @@
1
- import { run as advanceStep } from "./advance-step";
2
- import { run as currentStep } from "./current-step";
3
- import { run as readyPhases } from "./ready-phases";
4
- /** Workflow hooks by name, as invoked through `g3n-skills hook <name>`. */
5
- export const WORKFLOW_HOOKS = {
6
- "advance-step": advanceStep,
7
- "current-step": currentStep,
8
- "ready-phases": readyPhases,
9
- };
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workflow/hooks/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEpD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,cAAc,GAAmC;IAC5D,cAAc,EAAE,WAAW;IAC3B,cAAc,EAAE,WAAW;IAC3B,cAAc,EAAE,WAAW;CAC5B,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function run(argv: readonly string[]): Promise<void>;
2
- //# sourceMappingURL=ready-phases.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ready-phases.d.ts","sourceRoot":"","sources":["../../../src/workflow/hooks/ready-phases.ts"],"names":[],"mappings":"AAMA,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAWhE"}
@@ -1,15 +0,0 @@
1
- // packages/skills/src/workflow/hooks/ready-phases.ts
2
- import { childDirFor, listEntryNames, locateEntryOfType, readEntry } from "../../filetree";
3
- import { printJson, requireFlag, resolveRoot } from "../../hooks";
4
- import { gatesFor } from "../gates";
5
- export async function run(argv) {
6
- const root = await resolveRoot(argv);
7
- const plan = await locateEntryOfType(root, requireFlag(argv, "--plan", "auth-rework"), "plan");
8
- const planDir = childDirFor(plan.dir, plan.name);
9
- const phases = [];
10
- for (const name of await listEntryNames(planDir, "plan")) {
11
- phases.push((await readEntry(planDir, "plan", name)).meta);
12
- }
13
- printJson({ plan: plan.name, ...gatesFor(phases) }, argv);
14
- }
15
- //# sourceMappingURL=ready-phases.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ready-phases.js","sourceRoot":"","sources":["../../../src/workflow/hooks/ready-phases.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,IAAuB;IAC/C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,aAAa,CAAC,EAAE,MAAM,CAAC,CAAC;IAC/F,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEjD,MAAM,MAAM,GAAY,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,MAAM,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;QACzD,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAED,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;AAC5D,CAAC"}
@@ -1,8 +0,0 @@
1
- export { STEPS, PHASE_STATUS_AT, stepFor } from "./steps";
2
- export type { Step, StepState } from "./steps";
3
- export { readPhaseRun } from "./phase";
4
- export type { PhaseRun } from "./phase";
5
- export { gatesFor } from "./gates";
6
- export type { PlanGates, WaitingPhase } from "./gates";
7
- export { WORKFLOW_HOOKS } from "./hooks";
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -1,6 +0,0 @@
1
- // packages/skills/src/workflow/index.ts
2
- export { STEPS, PHASE_STATUS_AT, stepFor } from "./steps";
3
- export { readPhaseRun } from "./phase";
4
- export { gatesFor } from "./gates";
5
- export { WORKFLOW_HOOKS } from "./hooks";
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -1,16 +0,0 @@
1
- import { type EntryLocation } from "../filetree";
2
- import type { Phase, Task } from "../schemas";
3
- import { type StepState } from "./steps";
4
- /** A phase with everything the step hooks report on: its fields, its tasks, its step. */
5
- export interface PhaseRun {
6
- location: EntryLocation;
7
- /** Name of the plan holding the phase */
8
- plan: string;
9
- meta: Phase;
10
- body: string;
11
- tasks: Task[];
12
- step: StepState;
13
- }
14
- /** Reads the phase named `name` with its tasks, in queue order, and works out its step. */
15
- export declare function readPhaseRun(root: string, name: string): Promise<PhaseRun>;
16
- //# sourceMappingURL=phase.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phase.d.ts","sourceRoot":"","sources":["../../src/workflow/phase.ts"],"names":[],"mappings":"AACA,OAAO,EAA6D,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAElD,yFAAyF;AACzF,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,aAAa,CAAC;IACxB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,2FAA2F;AAC3F,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkBhF"}
@@ -1,22 +0,0 @@
1
- // packages/skills/src/workflow/phase.ts
2
- import { childDirFor, listEntryNames, locateEntryOfType, readEntry } from "../filetree";
3
- import { stepFor } from "./steps";
4
- /** Reads the phase named `name` with its tasks, in queue order, and works out its step. */
5
- export async function readPhaseRun(root, name) {
6
- const location = await locateEntryOfType(root, name, "phase");
7
- const { meta, body } = await readEntry(location.dir, "plan", location.name);
8
- const phaseDir = childDirFor(location.dir, location.name);
9
- const tasks = [];
10
- for (const id of await listEntryNames(phaseDir, "phase")) {
11
- tasks.push((await readEntry(phaseDir, "phase", id)).meta);
12
- }
13
- return {
14
- location,
15
- plan: location.trail[0] ?? "",
16
- meta,
17
- body,
18
- tasks,
19
- step: stepFor(meta.status, tasks.map((task) => task.status)),
20
- };
21
- }
22
- //# sourceMappingURL=phase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"phase.js","sourceRoot":"","sources":["../../src/workflow/phase.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAsB,MAAM,aAAa,CAAC;AAE5G,OAAO,EAAE,OAAO,EAAkB,MAAM,SAAS,CAAC;AAalD,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY,EAAE,IAAY;IAC3D,MAAM,QAAQ,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9D,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE5E,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAW,EAAE,CAAC;IACzB,KAAK,MAAM,EAAE,IAAI,MAAM,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO;QACL,QAAQ;QACR,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;QAC7B,IAAI;QACJ,IAAI;QACJ,KAAK;QACL,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { TaskStatus } from "../schemas/primitives";
2
- /** The steps a phase is worked through, in order. Each has a workflow skill of the same name. */
3
- export declare const STEPS: readonly ["plan", "execute", "review", "sync"];
4
- export type Step = (typeof STEPS)[number];
5
- /** Where a phase stands: on a step, finished, or stuck on blocked work. */
6
- export type StepState = Step | "done" | "blocked";
7
- /** Status a phase carries while it stands at each state. */
8
- export declare const PHASE_STATUS_AT: Record<StepState, TaskStatus>;
9
- /**
10
- * Step a phase is on, worked out from its own status and its tasks' statuses.
11
- * Nothing else records the step, so a task sent back from review returns the
12
- * phase to `execute` without anything being told.
13
- */
14
- export declare function stepFor(phaseStatus: TaskStatus, taskStatuses: readonly TaskStatus[]): StepState;
15
- //# sourceMappingURL=steps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/workflow/steps.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,iGAAiG;AACjG,eAAO,MAAM,KAAK,YAAI,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAEpE,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AAElD,4DAA4D;AAC5D,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,CAOzD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,CAU/F"}
@@ -1,32 +0,0 @@
1
- /** The steps a phase is worked through, in order. Each has a workflow skill of the same name. */
2
- export const STEPS = ["plan", "execute", "review", "sync"];
3
- /** Status a phase carries while it stands at each state. */
4
- export const PHASE_STATUS_AT = {
5
- plan: "open",
6
- execute: "in-progress",
7
- review: "in-review",
8
- sync: "in-review",
9
- done: "completed",
10
- blocked: "blocked",
11
- };
12
- /**
13
- * Step a phase is on, worked out from its own status and its tasks' statuses.
14
- * Nothing else records the step, so a task sent back from review returns the
15
- * phase to `execute` without anything being told.
16
- */
17
- export function stepFor(phaseStatus, taskStatuses) {
18
- if (phaseStatus === "completed")
19
- return "done";
20
- if (phaseStatus === "blocked")
21
- return "blocked";
22
- if (phaseStatus === "open" || taskStatuses.length === 0)
23
- return "plan";
24
- if (taskStatuses.some((status) => status === "open" || status === "in-progress"))
25
- return "execute";
26
- if (taskStatuses.some((status) => status === "blocked"))
27
- return "blocked";
28
- if (taskStatuses.some((status) => status === "in-review"))
29
- return "review";
30
- return "sync";
31
- }
32
- //# sourceMappingURL=steps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/workflow/steps.ts"],"names":[],"mappings":"AAGA,iGAAiG;AACjG,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AAOpE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,eAAe,GAAkC;IAC5D,IAAI,EAAK,MAAM;IACf,OAAO,EAAE,aAAa;IACtB,MAAM,EAAG,WAAW;IACpB,IAAI,EAAK,WAAW;IACpB,IAAI,EAAK,WAAW;IACpB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,WAAuB,EAAE,YAAmC;IAClF,IAAI,WAAW,KAAK,WAAW;QAAE,OAAO,MAAM,CAAC;IAC/C,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,WAAW,KAAK,MAAM,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAEvE,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,aAAa,CAAC;QAAE,OAAO,SAAS,CAAC;IACnG,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1E,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,WAAW,CAAC;QAAE,OAAO,QAAQ,CAAC;IAE3E,OAAO,MAAM,CAAC;AAChB,CAAC"}