@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,79 +0,0 @@
1
- ---
2
- name: hook-post-tool-use
3
- description: Writing a PostToolUse lifecycle hook — the one that reacts to a finished tool call and can feed the result back to the agent.
4
- registryDependencies: [writing-great-hooks]
5
- disable-model-invocation: true
6
- ---
7
-
8
- Shared rules for every hook — the invariants, the script mechanics, registration: [`writing-great-hooks`](../writing-great-hooks/SKILL.md).
9
-
10
- `PostToolUse` fires immediately after a tool has run. **The work is already done** — nothing this hook returns can undo it. What it can do is see the result and put a consequence in front of the agent, which makes it the event for verification, bookkeeping, and anything that must happen _because_ a file changed.
11
-
12
- ## Payload
13
-
14
- The four common fields, the call, and what came back:
15
-
16
- ```json
17
- {
18
- "session_id": "abc123",
19
- "transcript_path": "/home/you/.claude/projects/<slug>/<session>.jsonl",
20
- "cwd": "/home/you/project",
21
- "hook_event_name": "PostToolUse",
22
- "tool_name": "Edit",
23
- "tool_input": { "file_path": "/home/you/project/src/index.ts", "old_string": "…", "new_string": "…" },
24
- "tool_response": { "filePath": "/home/you/project/src/index.ts", "success": true }
25
- }
26
- ```
27
-
28
- `tool_input` and `tool_response` are both shaped by the tool. Branch on `tool_name` before reading either.
29
-
30
- ## Matcher
31
-
32
- Same tool-name regex as [`hook-pre-tool-use`](../hook-pre-tool-use/SKILL.md), and the same reason to keep it tight:
33
-
34
- ```json
35
- {
36
- "matcher": "Edit|MultiEdit|Write",
37
- "hooks": [{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/format-edited-file.ts" }]
38
- }
39
- ```
40
-
41
- ## What the exit code does
42
-
43
- - **`0` — nothing further happens.** stdout goes to the transcript, not to the agent.
44
- - **`2` — stderr is fed to the agent** as something it must address. The tool result still stands; this is a correction, not a rollback.
45
- - **anything else** — a non-blocking error; stderr goes to the user.
46
-
47
- The JSON form does the same job with a reason attached:
48
-
49
- ```json
50
- {
51
- "decision": "block",
52
- "reason": "tsc reported 2 errors in src/index.ts:\n L14 Property 'id' does not exist on type 'Order'\n L22 Object is possibly 'undefined'"
53
- }
54
- ```
55
-
56
- To hand the agent information without framing it as a failure, use `hookSpecificOutput.additionalContext` instead — it lands in context without asserting that something went wrong.
57
-
58
- _Return the diagnostic, not the fact of it._ "Typecheck failed" costs the agent a whole turn rediscovering what this hook already knew; the compiler's actual lines let it fix the problem immediately.
59
-
60
- ## What it is for
61
-
62
- - **Formatting and linting what was just edited** — the deterministic pass that should never be a request in prose.
63
- - **Typechecking the touched file** and returning the errors, so a broken edit is corrected in the same turn it was made.
64
- - **Tracking what changed.** Recording edited paths gives later turns, and a `Stop` hook, something concrete to act on.
65
- - **Feeding back a consequence the agent cannot see** — a failing test, a schema that no longer matches, a generated file now stale.
66
-
67
- ## What it is not for
68
-
69
- **Do not use it to prevent anything.** The tool has run; a hook that reads like a guard here is a guard that arrives too late. Prevention is [`hook-pre-tool-use`](../hook-pre-tool-use/SKILL.md).
70
-
71
- Be careful making it write. A hook that reformats the file the agent just edited changes content the agent believes it knows, and the next edit is built on a stale picture. Either keep the rewrite small and mechanical, or report instead of rewriting.
72
-
73
- ## Failure modes
74
-
75
- - _Whole-project work on one file's event._ Typechecking the entire monorepo because one file changed. It fires on every edit; scope it to `tool_input.file_path` or don't do it here.
76
- - _Verdict without evidence._ Blocking with "lint failed" and swallowing the output. The agent has to re-run the tool it can't see to learn what this hook already had.
77
- - _Silent rewrite._ Reformatting the edited file and returning `0`. The agent's next edit targets text that no longer exists, and the failure looks like the agent's mistake.
78
- - _Blocking on the expected._ Returning `decision: "block"` for a condition that is normal mid-task — a half-written module that doesn't typecheck yet. The agent is dragged into fixing something it was already about to finish.
79
- - _Assuming success._ Reading `tool_response` without checking whether the call actually succeeded, then reporting failures caused by a tool that never ran.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Hook: PostToolUse"
3
- short_description: "React to a finished tool call and feed the result back"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,84 +0,0 @@
1
- ---
2
- name: hook-pre-tool-use
3
- description: Writing a PreToolUse lifecycle hook — the one that can allow, deny, or escalate a tool call before it runs.
4
- registryDependencies: [writing-great-hooks]
5
- disable-model-invocation: true
6
- ---
7
-
8
- Shared rules for every hook — the invariants, the script mechanics, registration: [`writing-great-hooks`](../writing-great-hooks/SKILL.md).
9
-
10
- `PreToolUse` fires after the agent has chosen a tool and filled in its arguments, but **before the tool runs**. It is the only event that can stop an action from happening at all, which makes it the place for guardrails and policy, and the wrong place for anything that merely wants to observe.
11
-
12
- ## Payload
13
-
14
- The four common fields, plus the call about to be made:
15
-
16
- ```json
17
- {
18
- "session_id": "abc123",
19
- "transcript_path": "/home/you/.claude/projects/<slug>/<session>.jsonl",
20
- "cwd": "/home/you/project",
21
- "hook_event_name": "PreToolUse",
22
- "tool_name": "Write",
23
- "tool_input": { "file_path": "/home/you/project/src/index.ts", "content": "…" }
24
- }
25
- ```
26
-
27
- `tool_input` is shaped by the tool, so a hook matching more than one tool must branch on `tool_name` before reading a field. Never assume `file_path` exists.
28
-
29
- ## Matcher
30
-
31
- This event selects by tool name, as a regex:
32
-
33
- ```json
34
- {
35
- "matcher": "Edit|MultiEdit|Write",
36
- "hooks": [{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/guard-protected-paths.ts" }]
37
- }
38
- ```
39
-
40
- Omit `matcher` to see every tool call. **Scope it as tightly as the rule allows** — an unmatched hook is a process spawned on every tool call for the life of the session.
41
-
42
- ## What the exit code does
43
-
44
- - **`0` — the call proceeds.** stdout goes to the transcript, not to the agent.
45
- - **`2` — the call is denied**, and stderr is fed to the agent as the reason. This is the veto, and the agent can read the reason and try something else.
46
- - **anything else** — a non-blocking error: the call still runs, and stderr goes to the user.
47
-
48
- For the full decision, print JSON and exit `0`:
49
-
50
- ```json
51
- {
52
- "hookSpecificOutput": {
53
- "hookEventName": "PreToolUse",
54
- "permissionDecision": "deny",
55
- "permissionDecisionReason": "src/generated/ is written by `bun run codegen`. Edit the template instead."
56
- }
57
- }
58
- ```
59
-
60
- - **`allow`** runs the call and skips the permission prompt the user would otherwise see.
61
- - **`deny`** blocks it and hands the reason to the agent.
62
- - **`ask`** puts it to the user, whatever the current permission mode would have done.
63
-
64
- _Write the reason to the agent, not to a log._ It is the only thing the agent gets, and a good one turns a dead end into a corrected second attempt: name what was refused and what to do instead.
65
-
66
- ## What it is for
67
-
68
- - **Protecting paths and resources** — generated directories, lockfiles, anything with a real source elsewhere.
69
- - **Steering to the project's own tooling.** This repo registers a `PreToolUse` guard on `Bash|Grep` and `Read|Glob` that pushes the agent to query the graph before raw searching — policy that would otherwise be a paragraph of prose the agent may or may not honour.
70
- - **Pre-flight validation** — refusing a command whose arguments are malformed, out of scope, or aimed outside the project.
71
-
72
- ## What it is not for
73
-
74
- **Do not put a slow check here.** Every matching tool call waits on it, and the agent is idle while it runs. Verification of a result belongs in [`hook-post-tool-use`](../hook-post-tool-use/SKILL.md), which pays its cost after the work rather than in front of it.
75
-
76
- Nor should it encode judgement. A hard rule — this path is generated, that command is forbidden — is a guardrail. "Is this edit a good idea" is not, and hardcoding it produces a veto nobody can see or argue with.
77
-
78
- ## Failure modes
79
-
80
- - _Blanket matcher._ No `matcher`, or `.*`, for a rule that concerns two tools. Every call in the session now pays for it.
81
- - _Wrong field, wrong tool._ Reading `tool_input.file_path` on a `Bash` call, getting `undefined`, and treating that as "not a protected path". Branch on `tool_name` first, and fail closed when the shape is unfamiliar.
82
- - _Reasonless denial._ Exit `2` with an empty stderr, or a JSON `deny` with no `permissionDecisionReason`. The agent knows only that it was stopped, so it retries the same thing.
83
- - _Path comparison by string._ Matching `"src/generated"` against a raw argument, which `./src/../src/generated` and an absolute path both defeat. Resolve, then compare.
84
- - _Shell interpolation._ Pasting a payload field into a shell command. The agent's arguments reach a shell running with the user's credentials.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Hook: PreToolUse"
3
- short_description: "Allow, deny, or escalate a tool call before it runs"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,69 +0,0 @@
1
- ---
2
- name: hook-stop
3
- description: Writing a Stop lifecycle hook — the one that can refuse to let the agent end its turn, and the one that can loop forever if written carelessly.
4
- registryDependencies: [writing-great-hooks]
5
- disable-model-invocation: true
6
- ---
7
-
8
- Shared rules for every hook — the invariants, the script mechanics, registration: [`writing-great-hooks`](../writing-great-hooks/SKILL.md).
9
-
10
- `Stop` fires when the agent is about to finish its response. Its power is refusal: exit `2` and the turn does not end — the agent reads your reason and keeps working. That makes it the place for "not done until…" conditions, and the one event that can trap a session in a loop.
11
-
12
- It takes **no matcher**. `SubagentStop` is the sibling event for subagents finishing, and needs its own registration.
13
-
14
- ## Payload
15
-
16
- The four common fields, plus the loop guard:
17
-
18
- ```json
19
- {
20
- "session_id": "abc123",
21
- "transcript_path": "/home/you/.claude/projects/<slug>/<session>.jsonl",
22
- "cwd": "/home/you/project",
23
- "hook_event_name": "Stop",
24
- "stop_hook_active": false
25
- }
26
- ```
27
-
28
- **`stop_hook_active` is `true` when the agent is only still running because this hook already blocked it.** Check it first and let the stop through when it is set. Without that guard, a condition the agent cannot satisfy — a test failing for an unrelated reason, a check with a bug — blocks, prompts, blocks again, and never terminates.
29
-
30
- ```ts
31
- if (payload.stop_hook_active) process.exit(0);
32
- ```
33
-
34
- ## What the exit code does
35
-
36
- - **`0` — the turn ends** as it was going to.
37
- - **`2` — the agent is not allowed to stop**, and stderr becomes its instruction for what to do next.
38
- - **anything else** — a non-blocking error; the turn ends and stderr goes to the user.
39
-
40
- The JSON form requires the reason, because the reason _is_ the next instruction:
41
-
42
- ```json
43
- {
44
- "decision": "block",
45
- "reason": "bun test failed in packages/core: 2 failing in tests/registry/io.test.ts. Fix these before finishing."
46
- }
47
- ```
48
-
49
- A blocked stop with a vague reason is worse than no hook: the agent knows only that it may not stop, so it produces filler and tries again.
50
-
51
- ## What it is for
52
-
53
- - **Refusing to finish over a broken build** — a failing typecheck or test suite in the package that was touched this turn.
54
- - **Enforcing a completion criterion the agent tends to skip** — the changelog entry, the regenerated artifact, the doc updated alongside the code.
55
- - **Closing the loop on tracked work**, using the paths a [`hook-post-tool-use`](../hook-post-tool-use/SKILL.md) hook recorded, so the check only covers what actually changed.
56
-
57
- ## What it is not for
58
-
59
- **Do not use it as a chore runner.** Blocking is expensive — it spends a full turn of the agent's attention and the user's time. If the work is mechanical and does not need the agent's judgement, do it in the hook and exit `0`.
60
-
61
- And keep it cheap on the common path. It runs at the end of every turn, including the ones that only answered a question; a full test suite there taxes the entire session. Check whether anything relevant changed before doing real work.
62
-
63
- ## Failure modes
64
-
65
- - _The infinite loop._ Blocking without honouring `stop_hook_active`, on a condition the agent cannot fix. This is the defining failure of the event and the reason the field exists.
66
- - _Blocking on the pre-existing._ Refusing the stop over a test that was already failing before the turn started. The agent is held responsible for something it did not touch and cannot resolve.
67
- - _Reason without a next step._ `"Checks failed."` The agent cannot act on it, so it stalls or invents work.
68
- - _Turn-end tax._ A full build on every stop, including turns that changed nothing. Gate on the tracked file list first.
69
- - _Silent success._ Exiting `0` when the check itself errored — a missing binary, a bad path — so a hook that has quietly stopped working looks exactly like a passing one. Report the breakage as a non-blocking error instead.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Hook: Stop"
3
- short_description: "Refuse to let the agent end its turn until a condition is met"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,64 +0,0 @@
1
- ---
2
- name: hook-user-prompt-submit
3
- description: Writing a UserPromptSubmit lifecycle hook — the one that can add context to a prompt or reject it before the agent reads it.
4
- registryDependencies: [writing-great-hooks]
5
- disable-model-invocation: true
6
- ---
7
-
8
- Shared rules for every hook — the invariants, the script mechanics, registration: [`writing-great-hooks`](../writing-great-hooks/SKILL.md).
9
-
10
- `UserPromptSubmit` fires the instant the user submits, **before the agent has seen the prompt**. That position is the whole point: it is the only event that can put words in front of the agent that nobody typed, and the only one that can make a prompt never happen.
11
-
12
- It takes **no matcher** — there is no tool to match. Register it with an entry that has only a `hooks` array.
13
-
14
- ## Payload
15
-
16
- The four common fields, plus the prompt itself:
17
-
18
- ```json
19
- {
20
- "session_id": "abc123",
21
- "transcript_path": "/home/you/.claude/projects/<slug>/<session>.jsonl",
22
- "cwd": "/home/you/project",
23
- "hook_event_name": "UserPromptSubmit",
24
- "prompt": "add a migration for the orders table"
25
- }
26
- ```
27
-
28
- ## What the exit code does
29
-
30
- - **`0` — stdout is injected into the agent's context.** This event and `SessionStart` are the only places where plain stdout reaches the agent as content rather than transcript noise. Print nothing and nothing is added.
31
- - **`2` — the prompt is blocked and erased.** It never reaches the agent, and stderr is shown to the user alone. Use it to refuse, not to advise.
32
- - **anything else** — the prompt proceeds untouched; stderr goes to the user as a non-blocking error.
33
-
34
- Because bare stdout is already the injection channel, the simplest useful hook is an `echo` and an exit `0`. Reach for JSON when you need a field the plain channel can't express:
35
-
36
- ```json
37
- {
38
- "hookSpecificOutput": {
39
- "hookEventName": "UserPromptSubmit",
40
- "additionalContext": "Current sprint: S-42. Active branch: fix/orders-migration."
41
- }
42
- }
43
- ```
44
-
45
- To reject from JSON instead of exit `2`, print `{"decision": "block", "reason": "..."}` — the reason is shown to the user in place of the prompt.
46
-
47
- ## What it is for
48
-
49
- - **Injecting state the agent cannot see** — current branch, sprint, ticket, today's date, which service the user is in. Cheap, and it lands before the first token of reasoning.
50
- - **Routing to skills.** Match the prompt against trigger patterns and inject a line naming the skill that fits, so activation stops depending on the agent noticing.
51
- - **Refusing prompts that must not run** — a production-touching phrase, a missing ticket reference — by exiting `2` with a reason.
52
-
53
- ## What it is not for
54
-
55
- **Do not use it to rewrite what the user meant.** Injected context is invisible to the person who typed the prompt: they see their words, the agent sees yours, and every downstream surprise is unattributable. Add facts, not instructions that contradict the prompt.
56
-
57
- Keep it fast. It sits between the user pressing enter and anything at all happening, so its latency is felt directly on every single turn.
58
-
59
- ## Failure modes
60
-
61
- - _Silent hijack._ Injected text that redirects the task rather than informing it. The user cannot see it, cannot tell why the agent went sideways, and cannot turn it off.
62
- - _Context creep._ A paragraph injected on every prompt, most of it irrelevant to this one. It is paid on every turn for the whole session — inject the fields that change, not a status dump.
63
- - _Blocking too eagerly._ Exit `2` on a pattern that also matches innocent prompts. The user has no override and the prompt is already gone; prefer injecting a warning unless the action is genuinely unrecoverable.
64
- - _Leaking the payload._ Echoing the whole prompt into a log or an error message. Prompts carry secrets, and this hook sees every one of them.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Hook: UserPromptSubmit"
3
- short_description: "Add context to a prompt, or reject it, before the agent reads it"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,16 +0,0 @@
1
- {
2
- "name": "workflow",
3
- "description": "Work a phase of a plan through plan, execute, review and sync, one agent per step, with hooks deciding when a step is finished.",
4
- "version": "0.1.0",
5
- "license": "UNLICENSED",
6
- "dependencies": ["task-manager@g3n"],
7
- "skills": [
8
- "./skills/run",
9
- "./skills/plan",
10
- "./skills/execute",
11
- "./skills/review",
12
- "./skills/sync",
13
- "./skills/orchestrator",
14
- "./skills/worktree"
15
- ]
16
- }
@@ -1,9 +0,0 @@
1
- ---
2
- name: reviewer
3
- description: Read-only reviewer for the review step of the workflow. Judges each in-review task of a phase against its own brief and moves it to completed or back to in-progress. Use for the review step of a workflow run.
4
- disallowedTools: Edit, Write, NotebookEdit
5
- ---
6
-
7
- You review the tasks of one phase by following the `/review` skill. Load it before anything else.
8
-
9
- You change no file. The only state you move is a task's status, through `g3n-skills hook set-state`. Your findings go into your final report, which is the one thing the agent that spawned you will read, so each finding names the file and line, what is wrong, and what done looks like.
@@ -1,21 +0,0 @@
1
- ---
2
- name: execute
3
- description: Carry out the tasks of one phase, each in its own worktree, and hand every one to review. Use as the execute step of the workflow, when a phase has open or in-progress tasks, or when review sent a task back.
4
- registryDependencies: [task-manager, worktree, vocabulary, decisions]
5
- disable-model-invocation: false
6
- ---
7
-
8
- The execute step ends when no task of the phase is `open` or `in-progress`. A task leaves your hands as `in-review`, or as `blocked` with the reason in your report.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- 1. **Take your tasks.** A brief that names tasks gives you exactly those. Otherwise `g3n-skills hook current-step --phase <phase>` lists them under `holding`. Work them in that order, and start a task only once every id in its `depends_on` is `in-review` or `completed`.
13
- 2. **Open the task** with `g3n-skills hook get-entry --id <task>`, then claim it with `g3n-skills hook set-state --id <task> --to in-progress`. A task that is already `in-progress` came back from review. Its findings are in your brief, and they are the whole job this time.
14
- 3. **Get a worktree** through the `/worktree` skill, from the task's `worktree_type` and `id`. All edits happen inside it. The checkout you started in stays untouched.
15
- 4. **Do the work the brief describes.** Stay inside its goals. Something the brief did not foresee goes into your report, never into the diff. Use the `/vocabulary` skill on the task's `vocabulary` array before naming anything, and the `/decisions` skill before choosing between designs, since the plan may have chosen already.
16
- 5. **Prove it.** Tick a requirement only after checking it against the running code. Run the package's own type check and tests from inside the worktree. Done when every box is ticked and both pass.
17
- 6. **Commit inside the worktree**, one commit per task, with the task id in the subject line. Pushing belongs to nobody in this workflow.
18
- 7. **Hand it over** with `g3n-skills hook set-state --id <task> --to in-review`. A task you cannot finish goes to `blocked` instead, and your report says what would release it.
19
- 8. **Finish** once your tasks are handed over. Holding the whole phase, run `g3n-skills hook advance-step --phase <phase> --from execute`. Exit `1` lists the tasks still to be worked, so go back to step 1 for them. Holding only some of the tasks, leave `advance-step` to the parent.
20
-
21
- Your report lists, per task, the branch, the commit, the final status, and anything the brief did not foresee.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Execute"
3
- short_description: "Carry out a phase's tasks, each in its own worktree, and hand them to review"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,27 +0,0 @@
1
- ---
2
- name: orchestrator
3
- description: Runs a whole plan, phase by phase, opening each phase's gate once the phases it depends on are completed.
4
- registryDependencies: [task-manager, run]
5
- disable-model-invocation: true
6
- ---
7
-
8
- A plan is a **graph**. Its phases are the nodes, and `depends_on` draws the edges. Each phase sits behind a **gate** that opens once everything it depends on is `completed`. You open gates. The `/run` skill does everything behind them.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- `g3n-skills hook ready-phases --plan <plan>` sorts the plan's phases by gate:
13
-
14
- | Field | Holds |
15
- |---|---|
16
- | `ready` | phases whose gate is open, in queue order, each in full |
17
- | `waiting` | phases behind a closed gate, with the phases they are `waiting_on` |
18
- | `blocked` | phases set to `blocked` |
19
- | `completed` | finished phases |
20
-
21
- 1. **Claim the plan** with `g3n-skills hook set-state --id <plan> --to in-progress`, unless it already is.
22
- 2. **Read the gates** with `ready-phases`.
23
- - `ready` and `waiting` both empty means no gate is left to open. Go to step 5.
24
- - `ready` empty with anything in `waiting` means the graph is stuck behind a `blocked` phase. Go to step 5.
25
- 3. **Pick what runs.** Take the first phase in `ready`. Add every other `ready` phase marked `parrallel: true`, provided the first one is marked so too. Otherwise run the first one alone.
26
- 4. **Run each picked phase with the `/run` skill, from this session.** You are the parent of every agent in the plan, for the reason [`sub-agents.md`](../run/references/sub-agents.md) opens with, so a phase is never handed to one agent as a whole. With several phases picked, walk their `/run` loops side by side, spawning the agents of one round in one message. Done when each picked phase reads `done` or `blocked`. Then go to step 2.
27
- 5. **Close out.** With every phase `completed`, run `g3n-skills hook set-state --id <plan> --to completed`. Otherwise leave the plan `in-progress`. Report each phase with its status, what blocks the blocked ones, and which `waiting` phases they hold back.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Orchestrator"
3
- short_description: "Run a whole plan, opening each phase's gate once its dependencies are completed"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,18 +0,0 @@
1
- ---
2
- name: plan
3
- description: Turn one phase of a plan into task files an agent can execute without asking anything. Use as the plan step of the workflow, when a phase has no tasks yet, or when the user wants a phase broken down.
4
- registryDependencies: [task-manager, writing-great-tasks, vocabulary, decisions, grilling]
5
- disable-model-invocation: false
6
- ---
7
-
8
- The plan step ends with a phase whose every deliverable belongs to exactly one task. You write briefs here. Code comes in the next step.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- 1. **Read the phase** with `g3n-skills hook get-entry --id <phase>`. Its `trail` names the plan. Its `vocabulary` array lists the terms the phase mentions. Use the `/vocabulary` skill to read that array, and write every task in those terms.
13
- 2. **Read what is already closed** with `g3n-skills hook list-decisions --in <plan> --status accepted`, through the `/decisions` skill. A task never reopens an accepted decision. It builds on it.
14
- 3. **Close the open questions.** Where the phase leaves scope, an interface or an order of work undecided, use the `/grilling` skill with the user. Running as a spawned agent, you have no user to grill, so return the questions in your report and stop. Done when you could name every file the phase will touch.
15
- 4. **Cut the tasks.** One task is one agent's uninterrupted work with one reviewable diff. Two tasks that edit the same file get a `depends_on` between them, so they never run side by side. Done when each deliverable in the phase body maps to one task and no task holds two unrelated ones.
16
- 5. **Write each task** at `<phase folder>/tasks/<id>.md`. Copy the frontmatter from [`references/task-frontmatter.md`](references/task-frontmatter.md), which is the contract the hooks check. Use the `/writing-great-tasks` skill for the body only. Done when every task file opens with that frontmatter, filled in.
17
- 6. **Record what you settled.** A choice that passes the three tests goes through the `/decisions` skill. A concept you had to name goes through the `/vocabulary` skill.
18
- 7. **Finish** with `g3n-skills hook sync-tree`, then `g3n-skills hook advance-step --phase <phase> --from plan`. Exit `1` names what is missing. Fix that and run it again. The step is finished when it prints `"step": "execute"`.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Plan"
3
- short_description: "Turn one phase into task files an agent can execute"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,33 +0,0 @@
1
- # Task frontmatter
2
-
3
- The frontmatter every task file opens with. The hooks check it against `TaskSchema` and reject any key not listed here. This is the disclosed reference for the [`plan`](../SKILL.md) skill.
4
-
5
- ```yaml
6
- ---
7
- id: TASK-012
8
- title: Session table migration
9
- package: skills
10
- priority: high
11
- depends_on: [TASK-011]
12
- summary: Adds the sessions table and its indexes.
13
- complexity: 2
14
- worktree: true
15
- worktree_type: feature
16
- status: open
17
- ---
18
- ```
19
-
20
- | Key | Rule |
21
- |---|---|
22
- | `id` | A prefix, a hyphen, then digits. Equal to the file name. Unique across the whole tree, so continue from the highest in use, which `g3n-skills hook list-entries --in <phase>` shows per phase |
23
- | `title` | A few words naming the deliverable |
24
- | `package` | The package the work lands in |
25
- | `priority` | `critical`, `high`, `medium` or `low` |
26
- | `depends_on` | Ids of tasks that must be handed over first. Leave the key out when there are none |
27
- | `summary` | One sentence saying what is different once the task is done |
28
- | `complexity` | `1` to `5`. Optional |
29
- | `worktree` | Always `true` |
30
- | `worktree_type` | `feature`, `fix`, `refactor`, `chore`, `docs`, `snapshot`, `demo` or `experiment`. Becomes the branch prefix |
31
- | `status` | `open` at creation |
32
-
33
- Where the `/writing-great-tasks` skill shows another frontmatter, this one wins.
@@ -1,25 +0,0 @@
1
- ---
2
- name: review
3
- description: Judge each in-review task of a phase against its own requirements and either complete it or send it back. Use as the review step of the workflow, when every remaining task of a phase is in-review, or when the user wants a phase's work checked before it is merged.
4
- registryDependencies: [task-manager, writing-great-tasks, vocabulary, decisions]
5
- disable-model-invocation: false
6
- ---
7
-
8
- You are the **reviewer**, and you change no file. Your output is one verdict per task, moved through `set-state`, and findings exact enough that the next agent can act without asking you anything.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- 1. **List the tasks** with `g3n-skills hook current-step --phase <phase>`. `holding` names every task waiting for a verdict.
13
- 2. **Read the brief before the diff**, with `g3n-skills hook get-entry --id <task>`. The `/writing-great-tasks` skill says what each section of it promises. Then read the work with `git diff <base>...<task branch>`, using the branch names from your own brief.
14
- 3. **Check it, in this order.** Stop at the first failure only if it makes the rest unreadable.
15
- - **Requirements.** Every ticked box is true of the diff. Check each one yourself.
16
- - **Scope.** The diff stays inside the brief's goals and touches nothing listed under non-goals.
17
- - **Proof.** The package's type check and tests pass when you run them in the task's worktree.
18
- - **Words.** Through the `/vocabulary` skill: no avoided word in a new identifier, comment or doc.
19
- - **Decisions.** Through the `/decisions` skill: nothing in the diff contradicts an `accepted` decision of the plan.
20
- 4. **Give the verdict.**
21
- - Pass: `g3n-skills hook set-state --id <task> --to completed`.
22
- - Fail: `g3n-skills hook set-state --id <task> --to in-progress`. Each finding names the file and line, what is wrong, and what done looks like. A finding is a defect against the brief. Your taste is not a finding.
23
- 5. **Finish** with `g3n-skills hook advance-step --phase <phase> --from review` once `holding` is empty. It prints `"step": "sync"` when everything passed and `"step": "execute"` when anything went back. Both are a finished review.
24
-
25
- Your report lists every task with its verdict, and the findings for each one sent back. The parent carries those findings into the next execute brief, so write them for a reader who has not seen the diff.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Review"
3
- short_description: "Judge each in-review task against its brief and complete it or send it back"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,33 +0,0 @@
1
- ---
2
- name: run
3
- description: Work one phase of a plan through its four steps, plan, execute, review and sync, giving each step to a fresh agent and letting a hook decide when the step is finished. Use when the user wants a phase worked or names a phase to run, or when the orchestrator skill hands over a phase.
4
- registryDependencies: [task-manager, plan, execute, review, sync]
5
- disable-model-invocation: false
6
- ---
7
-
8
- You are the **parent**. You never do a step's work. You find out which step the phase is on, hand that step to one agent, and check what came back. Holding to that is what keeps each agent's context down to a single step.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- ## The step is read, never remembered
13
-
14
- `g3n-skills hook current-step --phase <phase>` returns the phase's `step`:
15
-
16
- | `step` | Meaning | Hand it to |
17
- |---|---|---|
18
- | `plan` | the phase has no tasks, or is still `open` | an agent running the `/plan` skill |
19
- | `execute` | a task is `open` or `in-progress` | agents running the `/execute` skill |
20
- | `review` | every remaining task is `in-review` | the **reviewer** agent running the `/review` skill |
21
- | `sync` | every task is `completed` | an agent running the `/sync` skill |
22
- | `done` | the phase is `completed` | nobody. Report and stop |
23
- | `blocked` | the phase or a task in `holding` is `blocked` | nobody. Report and stop |
24
-
25
- The step is worked out from the statuses on disk each time, so a task the reviewer sends back puts the phase on `execute` again with nothing to reset. `holding` names the tasks keeping the phase on its step.
26
-
27
- ## The loop
28
-
29
- 1. **Name the phase.** Use the one the user gave. With only a plan named, take the first phase from `g3n-skills hook ready-phases --plan <plan>`. Done when you hold one phase name.
30
- 2. **Read the step** with `current-step`. On `done` or `blocked`, go to step 5.
31
- 3. **Spawn the agent** for that step, briefed as [`references/sub-agents.md`](references/sub-agents.md) lays out. Read that file before the first spawn of a session. Done when every agent you spawned has returned its report.
32
- 4. **Read the step again.** The agent ends its own step with `advance-step`, so a finished step shows up here as a new `step`. After several execute agents side by side, run `g3n-skills hook advance-step --phase <phase> --from execute` yourself first, since none of them does. An unchanged `step` means the agent stopped early. Spawn that step again and put the last report and the `holding` list in the brief. After the third return with no change, run `g3n-skills hook set-state --id <phase> --to blocked` and go to step 5. Otherwise go to step 2.
33
- 5. **Report.** Tell the user the final `step`, each task with its status, the decisions and terms recorded along the way, and for `blocked` what is holding it and what would release it. Blocked work waits for the user.
@@ -1,5 +0,0 @@
1
- interface:
2
- display_name: "Run"
3
- short_description: "Work one phase through plan, execute, review and sync, one agent per step"
4
- policy:
5
- allow_implicit_invocation: false
@@ -1,46 +0,0 @@
1
- # Sub-agents
2
-
3
- How the parent of a workflow run spawns, briefs and retires the agent of each step. This is the disclosed reference for the [`run`](../SKILL.md) and [`orchestrator`](../../orchestrator/SKILL.md) skills.
4
-
5
- ## One rule decides who spawns
6
-
7
- **A spawned agent cannot spawn agents.** Every agent of a run is therefore started by the session the user is talking to. That session is the **parent**. It stays the parent for the whole run and never becomes a step's agent, even when a whole plan is being worked.
8
-
9
- ## Life cycle of one agent
10
-
11
- 1. **Spawn** one agent per step. Execute is the exception and may get several, as laid out below.
12
- 2. **Brief** it with the template below. The brief is everything the agent knows. It has not seen your conversation or the last agent's report.
13
- 3. **Wait** for its report. Leave the branches and worktrees it is using alone while it runs.
14
- 4. **Verify** with `g3n-skills hook current-step --phase <phase>`. The hook is the judge of whether the step is finished. The report only explains.
15
- 5. **Retire** it. A finished agent is never resumed for the next step, and the next step gets a new one. What has to survive goes into the next brief, the tree, a decision, or a term.
16
-
17
- ## The brief
18
-
19
- ```
20
- Run the /<step> skill on phase <phase> of plan <plan>.
21
- Project root: <absolute path>. Phase branch: <branch>. Base branch: <branch>.
22
- Tasks: <ids, for execute and review>. Task branches: <id → branch, for review and sync>.
23
- Carried over: <findings from review, open questions, reports sync must read>.
24
- End with the report the skill asks for.
25
- ```
26
-
27
- Give names, never contents. The agent reads the phase and its tasks through the hooks, which hand it the `vocabulary` along with them.
28
-
29
- ## Which agent per step
30
-
31
- | Step | Agent | Can edit |
32
- |---|---|---|
33
- | `plan` | general purpose | the tree only |
34
- | `execute` | general purpose, one or several | its task's worktree |
35
- | `review` | **reviewer**, defined in the plugin's `agents/reviewer.md` | nothing |
36
- | `sync` | general purpose | the phase branch, the tree |
37
-
38
- Where no `reviewer` agent type is offered, which is the case after `g3n-skills add workflow`, spawn a general purpose agent for `review` and open its brief with _You change no file._
39
-
40
- ## Running execute side by side
41
-
42
- Tasks whose `depends_on` are all `in-review` or `completed` can run at once, one agent per task, because each works in its own worktree. Spawn them in one message so they start together. A task waiting on another stays with the parent until that one is handed over. Each of these agents holds only some of the phase, so none of them calls `advance-step`. You run `g3n-skills hook advance-step --phase <phase> --from execute` once the last of them has returned.
43
-
44
- ## Without sub-agents
45
-
46
- A harness with no agent tool, Codex among them, runs the same loop in one session. Load the step's skill, do the step, run its `advance-step`, then load the next skill. The hooks and gates are the same ones. What is lost is the fresh context per step, so re-read `current-step` before each step and trust it over your memory of the last one.
@@ -1,18 +0,0 @@
1
- ---
2
- name: sync
3
- description: Land a reviewed phase by merging its task branches, removing their worktrees, recording its decisions and terms, and closing the phase. Use as the sync step of the workflow, or when every task of a phase is completed and the phase is still open.
4
- registryDependencies: [task-manager, worktree, vocabulary, decisions]
5
- disable-model-invocation: false
6
- ---
7
-
8
- The sync step leaves one branch holding the whole phase, no stray worktrees, and a tree that matches the code. It merges locally. Pushing and opening a pull request stay with the user.
9
-
10
- The hooks come from the `/task-manager` skill. Load it first when `g3n-skills` is not on `PATH`.
11
-
12
- 1. **Confirm the step** with `g3n-skills hook current-step --phase <phase>`. Go on only when it prints `"step": "sync"`.
13
- 2. **Merge the task branches** into the phase branch, in the order `current-step` lists the tasks, through the `/worktree` skill. A conflict you can settle from the two task briefs alone, settle. Any other conflict stops the step. Set the phase to `blocked` and put both sides in your report. Done when every task branch is merged and the package's type check and tests pass on the phase branch.
14
- 3. **Remove what is merged**, again through the `/worktree` skill. Done when `git worktree list` shows no worktree of this phase.
15
- 4. **Record what the phase decided.** Read the reports in your brief for choices the agents made along the way. Each one that passes the three tests goes through the `/decisions` skill. Each concept that got a name goes through the `/vocabulary` skill.
16
- 5. **Close the phase** with `g3n-skills hook sync-tree`, then `g3n-skills hook advance-step --phase <phase> --from sync`. The step is finished when it prints `"step": "done"`.
17
-
18
- Your report names the phase branch, the merged commits, the decisions and terms recorded, and the next phases whose gate this one opened, from `g3n-skills hook ready-phases --plan <plan>`.