@pennixrv/trellis 0.7.0-beta.9 → 0.7.1-beta.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 (488) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +14 -26
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/ablate.js +1 -1
  6. package/dist/commands/ablate.js.map +1 -1
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +30 -56
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/task-progress.d.ts +2 -0
  11. package/dist/commands/task-progress.d.ts.map +1 -1
  12. package/dist/commands/task-progress.js +37 -30
  13. package/dist/commands/task-progress.js.map +1 -1
  14. package/dist/commands/{channel → teamwork}/adapters/claude.d.ts +3 -3
  15. package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -0
  16. package/dist/commands/{channel → teamwork}/adapters/claude.js +3 -3
  17. package/dist/commands/teamwork/adapters/claude.js.map +1 -0
  18. package/dist/commands/{channel → teamwork}/adapters/codex.d.ts +1 -15
  19. package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -0
  20. package/dist/commands/{channel → teamwork}/adapters/codex.js +5 -42
  21. package/dist/commands/teamwork/adapters/codex.js.map +1 -0
  22. package/dist/commands/{channel → teamwork}/adapters/index.d.ts +6 -6
  23. package/dist/commands/teamwork/adapters/index.d.ts.map +1 -0
  24. package/dist/commands/{channel → teamwork}/adapters/index.js +16 -52
  25. package/dist/commands/teamwork/adapters/index.js.map +1 -0
  26. package/dist/commands/{channel → teamwork}/adapters/types.d.ts +2 -2
  27. package/dist/commands/teamwork/adapters/types.d.ts.map +1 -0
  28. package/dist/commands/teamwork/adapters/types.js.map +1 -0
  29. package/dist/commands/{channel → teamwork}/agent-loader.d.ts +2 -4
  30. package/dist/commands/teamwork/agent-loader.d.ts.map +1 -0
  31. package/dist/commands/{channel → teamwork}/agent-loader.js +4 -35
  32. package/dist/commands/teamwork/agent-loader.js.map +1 -0
  33. package/dist/commands/teamwork/artifact.d.ts +177 -0
  34. package/dist/commands/teamwork/artifact.d.ts.map +1 -0
  35. package/dist/commands/teamwork/artifact.js +908 -0
  36. package/dist/commands/teamwork/artifact.js.map +1 -0
  37. package/dist/commands/{channel → teamwork}/context-loader.d.ts +1 -1
  38. package/dist/commands/teamwork/context-loader.d.ts.map +1 -0
  39. package/dist/commands/{channel → teamwork}/context-loader.js +12 -12
  40. package/dist/commands/teamwork/context-loader.js.map +1 -0
  41. package/dist/commands/{channel → teamwork}/context-trust.d.ts +6 -6
  42. package/dist/commands/teamwork/context-trust.d.ts.map +1 -0
  43. package/dist/commands/{channel → teamwork}/context-trust.js +16 -16
  44. package/dist/commands/teamwork/context-trust.js.map +1 -0
  45. package/dist/commands/teamwork/context.d.ts +16 -0
  46. package/dist/commands/teamwork/context.d.ts.map +1 -0
  47. package/dist/commands/{channel → teamwork}/context.js +17 -17
  48. package/dist/commands/teamwork/context.js.map +1 -0
  49. package/dist/commands/teamwork/coordinator.d.ts +89 -0
  50. package/dist/commands/teamwork/coordinator.d.ts.map +1 -0
  51. package/dist/commands/teamwork/coordinator.js +1198 -0
  52. package/dist/commands/teamwork/coordinator.js.map +1 -0
  53. package/dist/commands/teamwork/create.d.ts +23 -0
  54. package/dist/commands/teamwork/create.d.ts.map +1 -0
  55. package/dist/commands/teamwork/create.js +39 -0
  56. package/dist/commands/teamwork/create.js.map +1 -0
  57. package/dist/commands/{channel → teamwork}/dev-parse-trace.d.ts +1 -1
  58. package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -0
  59. package/dist/commands/{channel → teamwork}/dev-parse-trace.js +1 -1
  60. package/dist/commands/teamwork/dev-parse-trace.js.map +1 -0
  61. package/dist/commands/{channel → teamwork}/guard.d.ts +27 -46
  62. package/dist/commands/teamwork/guard.d.ts.map +1 -0
  63. package/dist/commands/{channel → teamwork}/guard.js +54 -156
  64. package/dist/commands/teamwork/guard.js.map +1 -0
  65. package/dist/commands/teamwork/index.d.ts +3 -0
  66. package/dist/commands/teamwork/index.d.ts.map +1 -0
  67. package/dist/commands/{channel → teamwork}/index.js +135 -165
  68. package/dist/commands/teamwork/index.js.map +1 -0
  69. package/dist/commands/{channel → teamwork}/interrupt.d.ts +1 -1
  70. package/dist/commands/teamwork/interrupt.d.ts.map +1 -0
  71. package/dist/commands/teamwork/interrupt.js +22 -0
  72. package/dist/commands/teamwork/interrupt.js.map +1 -0
  73. package/dist/commands/teamwork/kill.d.ts +7 -0
  74. package/dist/commands/teamwork/kill.d.ts.map +1 -0
  75. package/dist/commands/{channel → teamwork}/kill.js +21 -21
  76. package/dist/commands/teamwork/kill.js.map +1 -0
  77. package/dist/commands/teamwork/list.d.ts +17 -0
  78. package/dist/commands/teamwork/list.d.ts.map +1 -0
  79. package/dist/commands/{channel → teamwork}/list.js +18 -27
  80. package/dist/commands/teamwork/list.js.map +1 -0
  81. package/dist/commands/{channel → teamwork}/messages.d.ts +1 -1
  82. package/dist/commands/teamwork/messages.d.ts.map +1 -0
  83. package/dist/commands/{channel → teamwork}/messages.js +18 -18
  84. package/dist/commands/teamwork/messages.js.map +1 -0
  85. package/dist/commands/teamwork/profiles.d.ts +25 -0
  86. package/dist/commands/teamwork/profiles.d.ts.map +1 -0
  87. package/dist/commands/teamwork/profiles.js +125 -0
  88. package/dist/commands/teamwork/profiles.js.map +1 -0
  89. package/dist/commands/teamwork/rm.d.ts +27 -0
  90. package/dist/commands/teamwork/rm.d.ts.map +1 -0
  91. package/dist/commands/{channel → teamwork}/rm.js +21 -22
  92. package/dist/commands/teamwork/rm.js.map +1 -0
  93. package/dist/commands/teamwork/run.d.ts +29 -0
  94. package/dist/commands/{channel → teamwork}/run.d.ts.map +1 -1
  95. package/dist/commands/teamwork/run.js +129 -0
  96. package/dist/commands/teamwork/run.js.map +1 -0
  97. package/dist/commands/{channel → teamwork}/send.d.ts +1 -1
  98. package/dist/commands/teamwork/send.d.ts.map +1 -0
  99. package/dist/commands/{channel → teamwork}/send.js +7 -7
  100. package/dist/commands/teamwork/send.js.map +1 -0
  101. package/dist/commands/{channel → teamwork}/spawn.d.ts +8 -12
  102. package/dist/commands/teamwork/spawn.d.ts.map +1 -0
  103. package/dist/commands/{channel → teamwork}/spawn.js +51 -112
  104. package/dist/commands/teamwork/spawn.js.map +1 -0
  105. package/dist/commands/teamwork/store/events.d.ts +22 -0
  106. package/dist/commands/teamwork/store/events.d.ts.map +1 -0
  107. package/dist/commands/{channel → teamwork}/store/events.js +8 -8
  108. package/dist/commands/teamwork/store/events.js.map +1 -0
  109. package/dist/commands/teamwork/store/filter.d.ts +3 -0
  110. package/dist/commands/teamwork/store/filter.d.ts.map +1 -0
  111. package/dist/commands/teamwork/store/filter.js +2 -0
  112. package/dist/commands/teamwork/store/filter.js.map +1 -0
  113. package/dist/commands/{channel → teamwork}/store/lock.d.ts +1 -1
  114. package/dist/commands/teamwork/store/lock.d.ts.map +1 -0
  115. package/dist/commands/{channel → teamwork}/store/lock.js +2 -2
  116. package/dist/commands/teamwork/store/lock.js.map +1 -0
  117. package/dist/commands/{channel → teamwork}/store/paths.d.ts +18 -32
  118. package/dist/commands/teamwork/store/paths.d.ts.map +1 -0
  119. package/dist/commands/{channel → teamwork}/store/paths.js +42 -109
  120. package/dist/commands/teamwork/store/paths.js.map +1 -0
  121. package/dist/commands/teamwork/store/schema.d.ts +18 -0
  122. package/dist/commands/teamwork/store/schema.d.ts.map +1 -0
  123. package/dist/commands/teamwork/store/schema.js +23 -0
  124. package/dist/commands/teamwork/store/schema.js.map +1 -0
  125. package/dist/commands/{channel → teamwork}/store/thread-state.d.ts +3 -3
  126. package/dist/commands/teamwork/store/thread-state.d.ts.map +1 -0
  127. package/dist/commands/{channel → teamwork}/store/thread-state.js +1 -1
  128. package/dist/commands/teamwork/store/thread-state.js.map +1 -0
  129. package/dist/commands/teamwork/store/watch.d.ts +19 -0
  130. package/dist/commands/teamwork/store/watch.d.ts.map +1 -0
  131. package/dist/commands/{channel → teamwork}/store/watch.js +8 -8
  132. package/dist/commands/teamwork/store/watch.js.map +1 -0
  133. package/dist/commands/teamwork/supervisor/idle.d.ts.map +1 -0
  134. package/dist/commands/teamwork/supervisor/idle.js.map +1 -0
  135. package/dist/commands/{channel → teamwork}/supervisor/inbox.d.ts +2 -2
  136. package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -0
  137. package/dist/commands/{channel → teamwork}/supervisor/inbox.js +14 -14
  138. package/dist/commands/teamwork/supervisor/inbox.js.map +1 -0
  139. package/dist/commands/{channel → teamwork}/supervisor/shutdown.d.ts +3 -6
  140. package/dist/commands/teamwork/supervisor/shutdown.d.ts.map +1 -0
  141. package/dist/commands/{channel → teamwork}/supervisor/shutdown.js +7 -17
  142. package/dist/commands/teamwork/supervisor/shutdown.js.map +1 -0
  143. package/dist/commands/{channel → teamwork}/supervisor/stdout.d.ts +3 -5
  144. package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -0
  145. package/dist/commands/{channel → teamwork}/supervisor/stdout.js +12 -23
  146. package/dist/commands/teamwork/supervisor/stdout.js.map +1 -0
  147. package/dist/commands/teamwork/supervisor/turns.d.ts.map +1 -0
  148. package/dist/commands/teamwork/supervisor/turns.js.map +1 -0
  149. package/dist/commands/{channel → teamwork}/supervisor/warning.d.ts +5 -5
  150. package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -0
  151. package/dist/commands/{channel → teamwork}/supervisor/warning.js +6 -6
  152. package/dist/commands/teamwork/supervisor/warning.js.map +1 -0
  153. package/dist/commands/{channel → teamwork}/supervisor.d.ts +21 -21
  154. package/dist/commands/teamwork/supervisor.d.ts.map +1 -0
  155. package/dist/commands/{channel → teamwork}/supervisor.js +53 -63
  156. package/dist/commands/teamwork/supervisor.js.map +1 -0
  157. package/dist/commands/teamwork/teammate-adapters.d.ts +31 -0
  158. package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -0
  159. package/dist/commands/teamwork/teammate-adapters.js +96 -0
  160. package/dist/commands/teamwork/teammate-adapters.js.map +1 -0
  161. package/dist/commands/teamwork/teammate-config.d.ts +19 -0
  162. package/dist/commands/teamwork/teammate-config.d.ts.map +1 -0
  163. package/dist/commands/teamwork/teammate-config.js +97 -0
  164. package/dist/commands/teamwork/teammate-config.js.map +1 -0
  165. package/dist/commands/teamwork/teammate-launch.d.ts +58 -0
  166. package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -0
  167. package/dist/commands/teamwork/teammate-launch.js +125 -0
  168. package/dist/commands/teamwork/teammate-launch.js.map +1 -0
  169. package/dist/commands/teamwork/text-body.d.ts +13 -0
  170. package/dist/commands/teamwork/text-body.d.ts.map +1 -0
  171. package/dist/commands/{channel → teamwork}/text-body.js +3 -3
  172. package/dist/commands/teamwork/text-body.js.map +1 -0
  173. package/dist/commands/teamwork/threads.d.ts +35 -0
  174. package/dist/commands/teamwork/threads.d.ts.map +1 -0
  175. package/dist/commands/{channel → teamwork}/threads.js +19 -19
  176. package/dist/commands/teamwork/threads.js.map +1 -0
  177. package/dist/commands/teamwork/title.d.ts +12 -0
  178. package/dist/commands/teamwork/title.d.ts.map +1 -0
  179. package/dist/commands/teamwork/title.js +24 -0
  180. package/dist/commands/teamwork/title.js.map +1 -0
  181. package/dist/commands/{channel → teamwork}/wait.d.ts +1 -5
  182. package/dist/commands/teamwork/wait.d.ts.map +1 -0
  183. package/dist/commands/{channel → teamwork}/wait.js +8 -21
  184. package/dist/commands/teamwork/wait.js.map +1 -0
  185. package/dist/commands/update.d.ts.map +1 -1
  186. package/dist/commands/update.js +93 -90
  187. package/dist/commands/update.js.map +1 -1
  188. package/dist/commands/workflow.d.ts +1 -1
  189. package/dist/commands/workflow.d.ts.map +1 -1
  190. package/dist/commands/workflow.js +9 -10
  191. package/dist/commands/workflow.js.map +1 -1
  192. package/dist/configurators/claude.d.ts +0 -17
  193. package/dist/configurators/claude.d.ts.map +1 -1
  194. package/dist/configurators/claude.js +2 -61
  195. package/dist/configurators/claude.js.map +1 -1
  196. package/dist/configurators/shared.d.ts.map +1 -1
  197. package/dist/configurators/shared.js +2 -2
  198. package/dist/configurators/shared.js.map +1 -1
  199. package/dist/configurators/snow.js +1 -1
  200. package/dist/configurators/snow.js.map +1 -1
  201. package/dist/configurators/workflow.d.ts +1 -1
  202. package/dist/configurators/workflow.js +5 -5
  203. package/dist/configurators/workflow.js.map +1 -1
  204. package/dist/constants/paths.d.ts +1 -1
  205. package/dist/constants/paths.d.ts.map +1 -1
  206. package/dist/constants/paths.js +1 -1
  207. package/dist/constants/paths.js.map +1 -1
  208. package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
  209. package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
  210. package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
  211. package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
  212. package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
  213. package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
  214. package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
  215. package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
  216. package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
  217. package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
  218. package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
  219. package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
  220. package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
  221. package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
  222. package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
  223. package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
  224. package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
  225. package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
  226. package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
  227. package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
  228. package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
  229. package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
  230. package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
  231. package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
  232. package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
  233. package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
  234. package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
  235. package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
  236. package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
  237. package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
  238. package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
  239. package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
  240. package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
  241. package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
  242. package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
  243. package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
  244. package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
  245. package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
  246. package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
  247. package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
  248. package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
  249. package/dist/migrations/manifests/0.7.0-beta.51.json +9 -0
  250. package/dist/migrations/manifests/0.7.0-beta.52.json +9 -0
  251. package/dist/migrations/manifests/0.7.0-beta.53.json +27 -0
  252. package/dist/migrations/manifests/0.7.0-beta.54.json +8 -0
  253. package/dist/migrations/manifests/0.7.1-beta.0.json +9 -0
  254. package/dist/migrations/manifests/0.7.1-beta.1.json +186 -0
  255. package/dist/migrations/manifests/0.7.1.json +9 -0
  256. package/dist/templates/claude/hooks/statusline.py +0 -7
  257. package/dist/templates/codex/hooks/session-start.py +31 -38
  258. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
  259. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
  260. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
  261. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
  262. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
  263. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
  264. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
  265. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
  266. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
  267. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  268. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
  269. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
  270. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  271. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
  272. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
  273. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
  274. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  275. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
  276. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
  277. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
  278. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  279. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
  280. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
  281. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
  282. package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
  283. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
  284. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
  285. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
  286. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
  287. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
  288. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
  289. package/dist/templates/common/commands/continue.md +9 -49
  290. package/dist/templates/common/commands/finish-work.md +10 -58
  291. package/dist/templates/common/commands/start.md +19 -49
  292. package/dist/templates/common/skills/brainstorm.md +11 -199
  293. package/dist/templates/copilot/hooks/session-start.py +30 -26
  294. package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -160
  295. package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
  296. package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
  297. package/dist/templates/copilot/prompts/start.prompt.md +12 -10
  298. package/dist/templates/dsh/DSH.md +2 -2
  299. package/dist/templates/extract.js +4 -0
  300. package/dist/templates/extract.js.map +1 -1
  301. package/dist/templates/kiro/agents/trellis.json +2 -2
  302. package/dist/templates/markdown/agents.md +14 -3
  303. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
  304. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
  305. package/dist/templates/markdown/workspace-index.md +0 -1
  306. package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
  307. package/dist/templates/opencode/lib/session-utils.js +20 -25
  308. package/dist/templates/opencode/lib/trellis-context.js +4 -76
  309. package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
  310. package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
  311. package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
  312. package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
  313. package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
  314. package/dist/templates/shared-hooks/session-start.py +21 -33
  315. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
  316. package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
  317. package/dist/templates/trellis/agents/teammate.md +63 -0
  318. package/dist/templates/trellis/config.yaml +29 -38
  319. package/dist/templates/trellis/gitignore.txt +1 -0
  320. package/dist/templates/trellis/index.d.ts +8 -12
  321. package/dist/templates/trellis/index.d.ts.map +1 -1
  322. package/dist/templates/trellis/index.js +14 -25
  323. package/dist/templates/trellis/index.js.map +1 -1
  324. package/dist/templates/trellis/scripts/add_session.py +1 -1
  325. package/dist/templates/trellis/scripts/common/__init__.py +0 -1
  326. package/dist/templates/trellis/scripts/common/active_task.py +136 -100
  327. package/dist/templates/trellis/scripts/common/config.py +7 -9
  328. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  329. package/dist/templates/trellis/scripts/common/io.py +19 -0
  330. package/dist/templates/trellis/scripts/common/paths.py +0 -1
  331. package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
  332. package/dist/templates/trellis/scripts/common/session_context.py +1 -8
  333. package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
  334. package/dist/templates/trellis/scripts/common/task_context.py +152 -59
  335. package/dist/templates/trellis/scripts/common/task_continuity.py +598 -0
  336. package/dist/templates/trellis/scripts/common/task_store.py +70 -548
  337. package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
  338. package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
  339. package/dist/templates/trellis/scripts/common/tasks.py +5 -8
  340. package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
  341. package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
  342. package/dist/templates/trellis/scripts/task.py +119 -377
  343. package/dist/templates/trellis/workflow.md +111 -706
  344. package/dist/utils/agent-refs.d.ts +5 -5
  345. package/dist/utils/agent-refs.js +6 -6
  346. package/dist/utils/file-writer.d.ts +3 -2
  347. package/dist/utils/file-writer.d.ts.map +1 -1
  348. package/dist/utils/file-writer.js +3 -2
  349. package/dist/utils/file-writer.js.map +1 -1
  350. package/dist/utils/managed-paths.d.ts +0 -7
  351. package/dist/utils/managed-paths.d.ts.map +1 -1
  352. package/dist/utils/managed-paths.js +0 -40
  353. package/dist/utils/managed-paths.js.map +1 -1
  354. package/dist/utils/manifest-prune.d.ts +2 -1
  355. package/dist/utils/manifest-prune.d.ts.map +1 -1
  356. package/dist/utils/manifest-prune.js +14 -16
  357. package/dist/utils/manifest-prune.js.map +1 -1
  358. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  359. package/dist/utils/uninstall-scrubbers.js +3 -3
  360. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  361. package/dist/utils/workflow-resolver.d.ts +10 -16
  362. package/dist/utils/workflow-resolver.d.ts.map +1 -1
  363. package/dist/utils/workflow-resolver.js +25 -36
  364. package/dist/utils/workflow-resolver.js.map +1 -1
  365. package/package.json +2 -2
  366. package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
  367. package/dist/commands/channel/adapters/claude.js.map +0 -1
  368. package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
  369. package/dist/commands/channel/adapters/codex.js.map +0 -1
  370. package/dist/commands/channel/adapters/index.d.ts.map +0 -1
  371. package/dist/commands/channel/adapters/index.js.map +0 -1
  372. package/dist/commands/channel/adapters/types.d.ts.map +0 -1
  373. package/dist/commands/channel/adapters/types.js.map +0 -1
  374. package/dist/commands/channel/agent-loader.d.ts.map +0 -1
  375. package/dist/commands/channel/agent-loader.js.map +0 -1
  376. package/dist/commands/channel/context-loader.d.ts.map +0 -1
  377. package/dist/commands/channel/context-loader.js.map +0 -1
  378. package/dist/commands/channel/context-trust.d.ts.map +0 -1
  379. package/dist/commands/channel/context-trust.js.map +0 -1
  380. package/dist/commands/channel/context.d.ts +0 -16
  381. package/dist/commands/channel/context.d.ts.map +0 -1
  382. package/dist/commands/channel/context.js.map +0 -1
  383. package/dist/commands/channel/create.d.ts +0 -29
  384. package/dist/commands/channel/create.d.ts.map +0 -1
  385. package/dist/commands/channel/create.js +0 -47
  386. package/dist/commands/channel/create.js.map +0 -1
  387. package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
  388. package/dist/commands/channel/dev-parse-trace.js.map +0 -1
  389. package/dist/commands/channel/guard.d.ts.map +0 -1
  390. package/dist/commands/channel/guard.js.map +0 -1
  391. package/dist/commands/channel/index.d.ts +0 -3
  392. package/dist/commands/channel/index.d.ts.map +0 -1
  393. package/dist/commands/channel/index.js.map +0 -1
  394. package/dist/commands/channel/interrupt.d.ts.map +0 -1
  395. package/dist/commands/channel/interrupt.js +0 -22
  396. package/dist/commands/channel/interrupt.js.map +0 -1
  397. package/dist/commands/channel/kill.d.ts +0 -7
  398. package/dist/commands/channel/kill.d.ts.map +0 -1
  399. package/dist/commands/channel/kill.js.map +0 -1
  400. package/dist/commands/channel/list.d.ts +0 -18
  401. package/dist/commands/channel/list.d.ts.map +0 -1
  402. package/dist/commands/channel/list.js.map +0 -1
  403. package/dist/commands/channel/messages.d.ts.map +0 -1
  404. package/dist/commands/channel/messages.js.map +0 -1
  405. package/dist/commands/channel/rm.d.ts +0 -27
  406. package/dist/commands/channel/rm.d.ts.map +0 -1
  407. package/dist/commands/channel/rm.js.map +0 -1
  408. package/dist/commands/channel/run.d.ts +0 -32
  409. package/dist/commands/channel/run.js +0 -141
  410. package/dist/commands/channel/run.js.map +0 -1
  411. package/dist/commands/channel/send.d.ts.map +0 -1
  412. package/dist/commands/channel/send.js.map +0 -1
  413. package/dist/commands/channel/spawn.d.ts.map +0 -1
  414. package/dist/commands/channel/spawn.js.map +0 -1
  415. package/dist/commands/channel/store/events.d.ts +0 -22
  416. package/dist/commands/channel/store/events.d.ts.map +0 -1
  417. package/dist/commands/channel/store/events.js.map +0 -1
  418. package/dist/commands/channel/store/filter.d.ts +0 -3
  419. package/dist/commands/channel/store/filter.d.ts.map +0 -1
  420. package/dist/commands/channel/store/filter.js +0 -2
  421. package/dist/commands/channel/store/filter.js.map +0 -1
  422. package/dist/commands/channel/store/lock.d.ts.map +0 -1
  423. package/dist/commands/channel/store/lock.js.map +0 -1
  424. package/dist/commands/channel/store/paths.d.ts.map +0 -1
  425. package/dist/commands/channel/store/paths.js.map +0 -1
  426. package/dist/commands/channel/store/schema.d.ts +0 -27
  427. package/dist/commands/channel/store/schema.d.ts.map +0 -1
  428. package/dist/commands/channel/store/schema.js +0 -34
  429. package/dist/commands/channel/store/schema.js.map +0 -1
  430. package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
  431. package/dist/commands/channel/store/thread-state.js.map +0 -1
  432. package/dist/commands/channel/store/watch.d.ts +0 -19
  433. package/dist/commands/channel/store/watch.d.ts.map +0 -1
  434. package/dist/commands/channel/store/watch.js.map +0 -1
  435. package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
  436. package/dist/commands/channel/supervisor/idle.js.map +0 -1
  437. package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
  438. package/dist/commands/channel/supervisor/inbox.js.map +0 -1
  439. package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
  440. package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
  441. package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
  442. package/dist/commands/channel/supervisor/stdout.js.map +0 -1
  443. package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
  444. package/dist/commands/channel/supervisor/turns.js.map +0 -1
  445. package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
  446. package/dist/commands/channel/supervisor/warning.js.map +0 -1
  447. package/dist/commands/channel/supervisor.d.ts.map +0 -1
  448. package/dist/commands/channel/supervisor.js.map +0 -1
  449. package/dist/commands/channel/text-body.d.ts +0 -13
  450. package/dist/commands/channel/text-body.d.ts.map +0 -1
  451. package/dist/commands/channel/text-body.js.map +0 -1
  452. package/dist/commands/channel/threads.d.ts +0 -39
  453. package/dist/commands/channel/threads.d.ts.map +0 -1
  454. package/dist/commands/channel/threads.js.map +0 -1
  455. package/dist/commands/channel/title.d.ts +0 -12
  456. package/dist/commands/channel/title.d.ts.map +0 -1
  457. package/dist/commands/channel/title.js +0 -24
  458. package/dist/commands/channel/title.js.map +0 -1
  459. package/dist/commands/channel/wait.d.ts.map +0 -1
  460. package/dist/commands/channel/wait.js.map +0 -1
  461. package/dist/commands/channel/workers.d.ts +0 -9
  462. package/dist/commands/channel/workers.d.ts.map +0 -1
  463. package/dist/commands/channel/workers.js +0 -31
  464. package/dist/commands/channel/workers.js.map +0 -1
  465. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
  466. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
  467. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
  468. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
  469. package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -222
  470. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
  471. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
  472. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
  473. package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
  474. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  475. package/dist/templates/trellis/agents/check.md +0 -70
  476. package/dist/templates/trellis/agents/implement.md +0 -71
  477. package/dist/templates/trellis/agents/subnode.env +0 -4
  478. package/dist/templates/trellis/agents/subnode.md +0 -76
  479. package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
  480. package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
  481. package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
  482. package/dist/templates/trellis/scripts/subnode_artifact.py +0 -735
  483. package/dist/templates/trellis/scripts/workspace_note.py +0 -126
  484. /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
  485. /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
  486. /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
  487. /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
  488. /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
@@ -1,549 +0,0 @@
1
- # Command Reference
2
-
3
- Authoritative current command reference for `trellis channel` subcommands,
4
- validated against the source in `packages/cli/src/commands/channel/`
5
- (`index.ts` Commander wiring and each subcommand handler).
6
-
7
- Every subcommand accepts `--scope <project|global>` unless noted; `project`
8
- is the default and resolves against the current cwd's project bucket.
9
-
10
- ## Top-level
11
-
12
- ```
13
- trellis channel <subcommand>
14
- ```
15
-
16
- > Multi-agent collaboration runtime — spawn / coordinate / interrupt worker
17
- > agents through a shared event log.
18
-
19
- ---
20
-
21
- ## Create / List
22
-
23
- ### `create <name>`
24
-
25
- ```bash
26
- trellis channel create <name>
27
- [--scope project|global] # default: project
28
- [--type chat|forum] # default: chat
29
- [--task <path>] # associated Trellis task dir
30
- [--project <slug>]
31
- [--labels a,b,c]
32
- [--description <text>] # stable channel description
33
- [--context-file <abs-path>] ... # repeatable
34
- [--context-raw <text>] ... # repeatable
35
- [--linked-context-file <abs-path>] # [deprecated alias]
36
- [--linked-context-raw <text>] # [deprecated alias]
37
- [--cwd <path>] # recorded in create event
38
- [--by <agent>] # default: main
39
- [--owner-session <id>] # opaque main Codex session owner
40
- [--force] # overwrite existing channel
41
- [--ephemeral] # hide from default list, prunable
42
- ```
43
-
44
- Behavior:
45
-
46
- - Appends a `create` event; immutable `type` (cannot mutate forum↔chat after).
47
- - `--ephemeral` channels are hidden from `channel list` by default and are
48
- the sweep target for `channel prune --ephemeral`.
49
- - `--linked-context-*` are folded into `--context-*`; emit a deprecation
50
- notice when used.
51
-
52
- ### `list`
53
-
54
- ```bash
55
- trellis channel list
56
- [--scope project|global]
57
- [--json]
58
- [--project <slug>] # substring match on task field
59
- [--all] # include ephemeral (suffix '*')
60
- [--all-projects] # scan every project bucket
61
- [--owner-session <id>] # exact immutable owner match
62
- ```
63
-
64
- Behavior:
65
-
66
- - Default scope: current cwd's project. `--all-projects` scans every bucket.
67
- - Pretty mode prints `NAME WORKERS EVENTS LAST KIND TYPE TASK`, sorted by
68
- recency, with a footer noting hidden ephemeral count.
69
- - `--json` switches to a JSON array.
70
-
71
- ---
72
-
73
- ## Chat Messages
74
-
75
- ### `send <name> [text]`
76
-
77
- ```bash
78
- trellis channel send <name> [text]
79
- --as <agent> # REQUIRED — author
80
- [--scope project|global]
81
- [--to <agents,csv>] # default: broadcast
82
- [--stdin | --text-file <path>] # body from stdin or file
83
- [--delivery-mode appendOnly|requireKnownWorker|requireRunningWorker]
84
- ```
85
-
86
- Behavior:
87
-
88
- - Body precedence: positional `[text]` → `--stdin` → `--text-file`.
89
- - `--to` with one entry stores a string; multiple stores an array; omitted
90
- means broadcast.
91
- - `--delivery-mode` selects targeted-delivery validation:
92
- - `appendOnly` (default-ish — just record),
93
- - `requireKnownWorker` (the named target must have a `spawned` event),
94
- - `requireRunningWorker` (the worker must currently be live).
95
- - Prints the appended event as one JSON line on stdout.
96
-
97
- > **Note:** `send` has **no** `--tag` and **no** `--kind` flag. See
98
- > [`tag-vs-kind`](#tag-vs-kind--how-event-shape-is-actually-controlled) below.
99
-
100
- ### `messages <name>`
101
-
102
- ```bash
103
- trellis channel messages <name>
104
- [--scope project|global]
105
- [--raw] # one JSON event per line
106
- [--follow] # stream new events
107
- [--last <N>] # last N matching events
108
- [--since <seq>] # seq > N
109
- [--kind <kind>] # one of CHANNEL_EVENT_KINDS
110
- [--from <csv>] # author filter
111
- [--to <target>] # routing target filter
112
- [--thread <key>] # forum-only
113
- [--action <thread-action>] # forum-only
114
- [--no-progress] # hide progress events
115
- ```
116
-
117
- Behavior:
118
-
119
- - Auto-detects forum channels: with no filters it renders the thread board
120
- instead of the event stream. `--thread` / `--action` are forum-only and
121
- error against chat channels.
122
- - `--kind` is validated against `CHANNEL_EVENT_KINDS` (single value, not
123
- CSV — that's the `wait` side).
124
-
125
- ### `barrier <name>`
126
-
127
- ```bash
128
- trellis channel barrier <name>
129
- [--scope project|global]
130
- ```
131
-
132
- Prints the channel's current durable event sequence as one integer. It does not
133
- append an event. Capture it after `create` and before an operation that can
134
- emit the event you intend to wait for, then pass it to `wait --after-seq`.
135
-
136
- ### `wait <name>`
137
-
138
- ```bash
139
- trellis channel wait <name>
140
- --as <agent> # REQUIRED — self for filter ctx
141
- [--scope project|global]
142
- [--timeout <Ns|Nm|Nh|Nms>] # parsed by parseDuration
143
- [--after-seq <integer>] # replay only events after barrier
144
- [--from <a,b>] # author CSV
145
- [--kind <k1,k2>] # CSV, OR semantics
146
- [--thread <key>] # forum filter
147
- [--action <thread-action>] # forum filter
148
- [--to <target>] # default: own agent (broadcast + me)
149
- [--include-progress] # also wake on progress events
150
- [--all] # require every --from to match
151
- ```
152
-
153
- Behavior:
154
-
155
- - Streams matching events as JSON, one per line.
156
- - Default `--to` filter is the caller's own agent (broadcast events still
157
- match — broadcast + explicit-to-me).
158
- - `--all` requires `--from` and blocks until every listed agent has produced
159
- a matching event.
160
- - Without `--after-seq`, the command captures its current event sequence before
161
- constructing its watcher and ignores prior events. With `--after-seq`, it
162
- replays matching events whose sequence is greater than that supplied barrier.
163
- - **Timeout exits 124** and prints `timeout: still waiting on ...` to stderr
164
- when `--all` was in play.
165
-
166
- ### `workers <name>`
167
-
168
- ```bash
169
- trellis channel workers <name>
170
- [--scope project|global]
171
- [--project-key <key>] # project bucket when names collide
172
- [--include-terminal]
173
- [--json]
174
- ```
175
-
176
- Reads the durable worker projection from Trellis core. Without
177
- `--include-terminal`, only non-terminal workers are shown. `--json` is the
178
- machine-readable form for coordinator recovery and disposition checks. This
179
- command includes the ordered, deduplicated `sessionIds` observed for each
180
- worker. It does not inspect PID sidecars and does not poll.
181
-
182
- ### `task progress`
183
-
184
- ```bash
185
- trellis task progress
186
- [--json]
187
- ```
188
-
189
- Counts task records under the direct active-task directories in
190
- `.trellis/tasks/`; archived tasks are historical and are excluded from the
191
- current plan. JSON output is
192
- `{planning, in_progress, completed, partial}` in the fixed lifecycle order.
193
- Malformed or unknown active task records set `partial: true` without inventing
194
- a lifecycle count. Human output uses `planning:in_progress:completed` and adds
195
- `?` when the projection is partial. With `--json`, update notices are written
196
- to stderr so stdout remains parseable.
197
-
198
- ---
199
-
200
- ## tag-vs-kind — how event shape is actually controlled
201
-
202
- There is **no `--tag` flag** anywhere in the v0.6.0 channel CLI; `--kind` is
203
- not a legacy alias for any `--tag` flag.
204
-
205
- Concrete model in the current source:
206
-
207
- - `--kind` is the only event-type filter, and it is constrained to the
208
- trellis-emitted whitelist (`CHANNEL_EVENT_KINDS` in
209
- `packages/core/src/channel/internal/store/events.ts`):
210
- - `create`, `join`, `leave`, `message`, `thread`, `context`, `channel`,
211
- `spawned`, `killed`, `respawned`, `progress`, `done`, `error`,
212
- `waiting`, `awake`, `undeliverable`, `interrupt_requested`,
213
- `turn_started`, `turn_finished`, `interrupted`, `supervisor_warning`
214
- - Passing anything else throws
215
- `Invalid --kind '<x>'. Must be one of: …`.
216
- - `--kind` lives on `wait` (CSV, OR semantics) and `messages` (single
217
- value). `send` and `run` cannot emit a custom kind — every `send` writes
218
- a `message` event.
219
- - Mid-turn worker abort is **not** a tag. It is the dedicated
220
- `channel interrupt` command, which appends an `interrupt_requested` /
221
- `interrupted` pair and provider-level interrupts the worker.
222
-
223
- Practical rule for dispatchers waiting on workers:
224
-
225
- - Use `--kind done,turn_finished` for "worker finished a turn" — these are
226
- system events that the supervisor fires automatically. Do not depend on
227
- the worker LLM remembering to emit any custom signal.
228
- - Use `trellis channel interrupt` (the command) only when you actually want
229
- mid-turn abort behavior.
230
- - Do **not** invent user-side tags as completion signals. There is no
231
- `--tag` filter; a worker writing a custom string into its final message
232
- is just text inside a `message` event and cannot be matched by `wait`.
233
-
234
- Long bodies always go through stdin or a file:
235
-
236
- ```bash
237
- trellis channel send T --as A --stdin < /tmp/message.md
238
- trellis channel send T --as A --text-file /tmp/message.md
239
- ```
240
-
241
- ---
242
-
243
- ## Interrupt
244
-
245
- ### `interrupt <name> [text]`
246
-
247
- ```bash
248
- trellis channel interrupt <name> [text]
249
- --as <agent> # REQUIRED — caller
250
- --to <agent> # REQUIRED — target worker
251
- [--scope project|global]
252
- [--stdin | --text-file <path>]
253
- ```
254
-
255
- Behavior:
256
-
257
- - Appends an `interrupt` event with `reason: "user"` and a replacement
258
- instruction body; supervisor performs provider-level interrupt where
259
- supported (Claude `/interrupt`, Codex turn cancel).
260
- - Prints the appended event JSON on stdout.
261
-
262
- ---
263
-
264
- ## Workers
265
-
266
- ### `spawn <name>`
267
-
268
- ```bash
269
- trellis channel spawn <name>
270
- [--scope project|global]
271
- [--agent <agent-name>] # loads .trellis/agents/<name>.md
272
- [--provider claude|codex] # overrides agent file
273
- [--as <worker-name>] # default: agent name
274
- [--cwd <path>]
275
- [--model <id>]
276
- [--resume <id>] # session/thread id resume
277
- [--timeout <Ns|Nm|Nh>] # auto-kill after duration
278
- [--warn-before <Ns|Nm|Nh>] # supervisor_warning lead time
279
- # default 5m; subnode role reads config
280
- [--file <path>] ... # glob, repeatable; inject content
281
- [--jsonl <path>] ... # Trellis manifest, repeatable
282
- [--by <agent>] # spawn-event author
283
- # default: TRELLIS_CHANNEL_AS env or 'main'
284
- [--inbox-policy explicitOnly|broadcastAndExplicit]
285
- # default explicitOnly
286
- [--idle-timeout <Ns|Nm|Nh>] # OOM-guard idle TTL
287
- # default 5m; subnode role reads config
288
- [--max-live-workers <n>] # spawn-time live-worker budget
289
- # default 6; subnode role reads config
290
- ```
291
-
292
- Behavior:
293
-
294
- - Provider is validated against the adapter registry
295
- (`packages/cli/src/commands/channel/adapters/`); current: `claude`,
296
- `codex`.
297
- - Worker stays inbox-idle until the first `send --to <worker>`.
298
- - Records a `spawned` event with `pid`, `provider`, `agent`, `files`,
299
- `manifests`.
300
- - OOM-guard precedence: CLI flag → env var
301
- (`TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT`,
302
- `TRELLIS_CHANNEL_MAX_LIVE_WORKERS`) →
303
- `.trellis/config.yaml#channel.worker_guard` → built-in defaults.
304
- - `--agent subnode` additionally reads `.trellis/config.yaml#channel.subnode`:
305
- its `idle_timeout` / `max_live_workers` sit below explicit flags and the
306
- guard environment variables but above `worker_guard`; its `timeout` /
307
- `warn_before` supply the role's supervisor defaults. Generated projects set
308
- `max_live_workers: 8` without changing ordinary workers' default of `6`.
309
-
310
- ### `run [name]`
311
-
312
- ```bash
313
- trellis channel run [name?]
314
- [--agent <name>]
315
- [--provider claude|codex]
316
- [--as <worker-name>]
317
- [--cwd <path>]
318
- [--model <id>]
319
- [--file <path>] ... # repeatable, glob
320
- [--jsonl <path>] ... # repeatable
321
- [--message <text> | --message-file <path> | --stdin]
322
- [--timeout <Ns|Nm|Nh>] # default 5m; subnode role reads config
323
- ```
324
-
325
- Behavior:
326
-
327
- - One-shot. Auto-generates `run-<hex>` if `name` omitted.
328
- - Creates an ephemeral channel (`createMode=run`), spawns a single worker,
329
- sends the prompt, waits for `done`, prints the final assistant text to
330
- stdout, then removes the channel on success. On failure the channel is
331
- kept for inspection and exit code is 1.
332
-
333
- > `run` has **no** `--tag` flag. Completion is detected via the `done`
334
- > event the supervisor emits.
335
-
336
- ### `kill <name>`
337
-
338
- ```bash
339
- trellis channel kill <name>
340
- --as <agent> # REQUIRED — worker agent name
341
- [--scope project|global]
342
- [--force] # SIGKILL immediately
343
- ```
344
-
345
- Behavior:
346
-
347
- - Default path: SIGTERM → 8 s grace → SIGKILL escalation; the CLI writes a
348
- `killed` event when SIGKILL was needed so the log stays truthful.
349
- - Cleans `pid`, `worker-pid`, `config`, `spawnlock` sidecar files; keeps
350
- `log`, `session-id`, `thread-id` for forensics / resume.
351
-
352
- ### `rm <name>`
353
-
354
- ```bash
355
- trellis channel rm <name>
356
- [--scope project|global]
357
- ```
358
-
359
- Behavior:
360
-
361
- - Kills any live workers, then deletes the entire channel directory.
362
- - Prints `Removed channel '<name>'`.
363
-
364
- ### `prune`
365
-
366
- ```bash
367
- trellis channel prune
368
- [--scope project|global] # omitted: scan every project
369
- [--all | --empty | --idle <Ns|Nm|Nh|Nd> | --ephemeral] # mutually exclusive
370
- [--yes] # actually delete (default: dry-run)
371
- [--dry-run] # default true; redundant with default
372
- [--keep <names,csv>] # exclusion list
373
- ```
374
-
375
- Behavior:
376
-
377
- - Filter flags are mutually exclusive — error otherwise.
378
- - Default is dry-run; `--yes` flips to real delete.
379
- - Without `--scope`, scans **every** project bucket (intentional, repo-wide
380
- cleanup); with `--scope project|global`, limited to that bucket.
381
- - Live-worker channels are always skipped regardless of filter.
382
- - Output: per-candidate line `name last-ts (reason)` plus a final summary.
383
-
384
- ---
385
-
386
- ## Forum Channels
387
-
388
- ### `post <name> <action>`
389
-
390
- ```bash
391
- trellis channel post <name> <action>
392
- --as <agent> # REQUIRED
393
- [--scope project|global]
394
- [--thread <key>] # required except action=opened
395
- [--title <text>]
396
- [--text <text> | --stdin | --text-file <path>]
397
- [--description <text>] # stable thread description
398
- [--status <status>]
399
- [--labels a,b] # REPLACES thread labels
400
- [--assignees a,b] # REPLACES assignees
401
- [--summary <text>]
402
- [--context-file <abs-path>] ...
403
- [--context-raw <text>] ...
404
- [--linked-context-file <abs-path>] # [deprecated alias]
405
- [--linked-context-raw <text>] # [deprecated alias]
406
- ```
407
-
408
- Behavior:
409
-
410
- - `<action>` is free-form on the CLI surface; conventional values include
411
- `opened`, `comment`, `status`, `labels`, `assignees`, `summary`,
412
- `processed`.
413
- - `action=rename` is rejected — use `thread rename` instead.
414
- - `--labels` / `--assignees` are replace-semantics, not append.
415
- - Output: appended event JSON on stdout.
416
-
417
- ### `forum <name>`
418
-
419
- ```bash
420
- trellis channel forum <name>
421
- [--scope project|global]
422
- [--status <status>]
423
- [--raw]
424
- ```
425
-
426
- Behavior:
427
-
428
- - Lists threads (reduced state). `--status` filters by current thread
429
- status. `--raw` prints one JSON per thread.
430
-
431
- ### `thread <name> <thread>` / `thread rename`
432
-
433
- ```bash
434
- trellis channel thread <name> <thread-key>
435
- [--scope project|global]
436
- [--raw]
437
-
438
- trellis channel thread rename <name> <old-thread> <new-thread>
439
- --as <agent> # REQUIRED
440
- [--scope project|global]
441
- ```
442
-
443
- Behavior:
444
-
445
- - `thread <name> <key>` shows one thread's timeline:
446
- header `<thread> [<status>] <title>`, then description / labels /
447
- assignees / summary / timeline lines. `--raw` switches to raw events.
448
- - `thread rename` is the only mutation; `post --action rename` is rejected.
449
-
450
- ---
451
-
452
- ## Context / Title
453
-
454
- ### `context add` / `context delete` / `context list`
455
-
456
- ```bash
457
- trellis channel context add <name>
458
- [--as <agent>] # default: main
459
- [--scope project|global]
460
- [--thread <key>] # thread-level instead of channel-level
461
- [--file <abs-path>] ... # repeatable
462
- [--raw <text>] ... # repeatable
463
- # at least one of --file or --raw
464
-
465
- trellis channel context delete <name>
466
- [--as <agent>] # default: main
467
- [--scope project|global]
468
- [--thread <key>]
469
- [--file <abs-path>] ...
470
- [--raw <text>] ...
471
-
472
- trellis channel context list <name>
473
- [--scope project|global]
474
- [--thread <key>]
475
- [--raw] # one JSON entry per line
476
- ```
477
-
478
- Behavior:
479
-
480
- - `add` / `delete` append a `context` event and print the event JSON.
481
- - `list` projects current context entries; pretty output is
482
- `file <path>` / `raw <truncated text>` lines, `(no context)` when empty.
483
-
484
- ### `title set <name>` / `title clear <name>`
485
-
486
- ```bash
487
- trellis channel title set <name>
488
- --title <text> # REQUIRED
489
- [--as <agent>] # default: main
490
- [--scope project|global]
491
-
492
- trellis channel title clear <name>
493
- [--as <agent>] # default: main
494
- [--scope project|global]
495
- ```
496
-
497
- Behavior:
498
-
499
- - Appends a `title` event projecting a stable display title onto the
500
- channel. Output: event JSON.
501
-
502
- ---
503
-
504
- ## Hidden / Internal
505
-
506
- | Command | Purpose |
507
- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
508
- | `channel __supervisor <channel> <worker> <config>` | Forked entry point invoked by `spawn`. Do not invoke directly. |
509
- | `channel __parse-trace <adapter> <file>` | Dev helper — replays a recorded stream-json / wire trace through the matching adapter and prints the resulting channel events. Adapter is validated against the provider registry. |
510
-
511
- ---
512
-
513
- ## Event Model
514
-
515
- `CHANNEL_EVENT_KINDS` (whitelist enforced by `parseChannelKind`):
516
-
517
- `create`, `join`, `leave`, `message`, `thread`, `context`, `channel`,
518
- `spawned`, `killed`, `respawned`, `progress`, `done`, `error`, `waiting`,
519
- `awake`, `undeliverable`, `interrupt_requested`, `turn_started`,
520
- `turn_finished`, `interrupted`, `supervisor_warning`.
521
-
522
- `MEANINGFUL_EVENT_KINDS` (default-visible subset used by `wait` /
523
- `messages` when no explicit `--kind` is given):
524
-
525
- `create`, `join`, `leave`, `message`, `thread`, `context`, `channel`,
526
- `spawned`, `killed`, `respawned`, `done`, `error`.
527
-
528
- Non-meaningful kinds (e.g. `progress`, `waiting`, `awake`,
529
- `supervisor_warning`, the `turn_*` / `interrupt*` set) still flow through
530
- the store; opt in via `--kind` or `--include-progress`.
531
-
532
- Forum channels are event-sourced; use the CLI reducers
533
- (`forum`, `thread`, `context list`) for state projection.
534
-
535
- ---
536
-
537
- ## Output Conventions
538
-
539
- - **Mutations** (`send`, `interrupt`, `post`, `context add/delete`,
540
- `title set/clear`, `thread rename`) print the appended event as one JSON
541
- line on **stdout**.
542
- - **Streaming reads** (`wait`, `messages --follow`) print one JSON event
543
- per line on stdout.
544
- - **Pretty reads** (`list`, `messages`, `forum`, `thread`, `context list`)
545
- print colored, padded tables / timelines.
546
- - **`run`** prints only the final assistant text on stdout (so callers can
547
- pipe); diagnostic notes go to stderr.
548
- - **Errors** go through `chalk.red("Error:")` to stderr and `exit 1`.
549
- - **`wait` timeout** specifically exits **124**.