@pennixrv/trellis 0.7.0-beta.9 → 0.7.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (484) 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 +48 -89
  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.json +9 -0
  255. package/dist/templates/claude/hooks/statusline.py +0 -7
  256. package/dist/templates/codex/hooks/session-start.py +31 -38
  257. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
  258. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
  259. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
  260. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
  261. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
  262. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
  263. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
  264. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
  265. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
  266. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  267. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
  268. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
  269. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  270. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
  271. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
  272. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
  273. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  274. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
  275. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
  276. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
  277. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  278. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
  279. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
  280. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
  281. package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
  282. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
  283. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
  284. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
  285. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
  286. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
  287. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
  288. package/dist/templates/common/commands/continue.md +9 -49
  289. package/dist/templates/common/commands/finish-work.md +10 -58
  290. package/dist/templates/common/commands/start.md +19 -49
  291. package/dist/templates/common/skills/brainstorm.md +11 -199
  292. package/dist/templates/copilot/hooks/session-start.py +30 -26
  293. package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -160
  294. package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
  295. package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
  296. package/dist/templates/copilot/prompts/start.prompt.md +12 -10
  297. package/dist/templates/dsh/DSH.md +2 -2
  298. package/dist/templates/kiro/agents/trellis.json +2 -2
  299. package/dist/templates/markdown/agents.md +14 -3
  300. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
  301. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
  302. package/dist/templates/markdown/workspace-index.md +0 -1
  303. package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
  304. package/dist/templates/opencode/lib/session-utils.js +20 -25
  305. package/dist/templates/opencode/lib/trellis-context.js +4 -76
  306. package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
  307. package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
  308. package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
  309. package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
  310. package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
  311. package/dist/templates/shared-hooks/session-start.py +21 -33
  312. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
  313. package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
  314. package/dist/templates/trellis/agents/teammate.md +63 -0
  315. package/dist/templates/trellis/config.yaml +29 -38
  316. package/dist/templates/trellis/gitignore.txt +1 -0
  317. package/dist/templates/trellis/index.d.ts +8 -12
  318. package/dist/templates/trellis/index.d.ts.map +1 -1
  319. package/dist/templates/trellis/index.js +14 -25
  320. package/dist/templates/trellis/index.js.map +1 -1
  321. package/dist/templates/trellis/scripts/add_session.py +1 -1
  322. package/dist/templates/trellis/scripts/common/__init__.py +0 -1
  323. package/dist/templates/trellis/scripts/common/active_task.py +136 -100
  324. package/dist/templates/trellis/scripts/common/config.py +7 -9
  325. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  326. package/dist/templates/trellis/scripts/common/io.py +19 -0
  327. package/dist/templates/trellis/scripts/common/paths.py +0 -1
  328. package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
  329. package/dist/templates/trellis/scripts/common/session_context.py +1 -8
  330. package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
  331. package/dist/templates/trellis/scripts/common/task_context.py +152 -59
  332. package/dist/templates/trellis/scripts/common/task_continuity.py +598 -0
  333. package/dist/templates/trellis/scripts/common/task_store.py +70 -548
  334. package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
  335. package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
  336. package/dist/templates/trellis/scripts/common/tasks.py +5 -8
  337. package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
  338. package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
  339. package/dist/templates/trellis/scripts/task.py +119 -377
  340. package/dist/templates/trellis/workflow.md +111 -706
  341. package/dist/utils/agent-refs.d.ts +5 -5
  342. package/dist/utils/agent-refs.js +6 -6
  343. package/dist/utils/file-writer.d.ts +3 -2
  344. package/dist/utils/file-writer.d.ts.map +1 -1
  345. package/dist/utils/file-writer.js +3 -2
  346. package/dist/utils/file-writer.js.map +1 -1
  347. package/dist/utils/managed-paths.d.ts +0 -7
  348. package/dist/utils/managed-paths.d.ts.map +1 -1
  349. package/dist/utils/managed-paths.js +0 -40
  350. package/dist/utils/managed-paths.js.map +1 -1
  351. package/dist/utils/manifest-prune.d.ts.map +1 -1
  352. package/dist/utils/manifest-prune.js +2 -11
  353. package/dist/utils/manifest-prune.js.map +1 -1
  354. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  355. package/dist/utils/uninstall-scrubbers.js +3 -3
  356. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  357. package/dist/utils/workflow-resolver.d.ts +10 -16
  358. package/dist/utils/workflow-resolver.d.ts.map +1 -1
  359. package/dist/utils/workflow-resolver.js +25 -36
  360. package/dist/utils/workflow-resolver.js.map +1 -1
  361. package/package.json +2 -2
  362. package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
  363. package/dist/commands/channel/adapters/claude.js.map +0 -1
  364. package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
  365. package/dist/commands/channel/adapters/codex.js.map +0 -1
  366. package/dist/commands/channel/adapters/index.d.ts.map +0 -1
  367. package/dist/commands/channel/adapters/index.js.map +0 -1
  368. package/dist/commands/channel/adapters/types.d.ts.map +0 -1
  369. package/dist/commands/channel/adapters/types.js.map +0 -1
  370. package/dist/commands/channel/agent-loader.d.ts.map +0 -1
  371. package/dist/commands/channel/agent-loader.js.map +0 -1
  372. package/dist/commands/channel/context-loader.d.ts.map +0 -1
  373. package/dist/commands/channel/context-loader.js.map +0 -1
  374. package/dist/commands/channel/context-trust.d.ts.map +0 -1
  375. package/dist/commands/channel/context-trust.js.map +0 -1
  376. package/dist/commands/channel/context.d.ts +0 -16
  377. package/dist/commands/channel/context.d.ts.map +0 -1
  378. package/dist/commands/channel/context.js.map +0 -1
  379. package/dist/commands/channel/create.d.ts +0 -29
  380. package/dist/commands/channel/create.d.ts.map +0 -1
  381. package/dist/commands/channel/create.js +0 -47
  382. package/dist/commands/channel/create.js.map +0 -1
  383. package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
  384. package/dist/commands/channel/dev-parse-trace.js.map +0 -1
  385. package/dist/commands/channel/guard.d.ts.map +0 -1
  386. package/dist/commands/channel/guard.js.map +0 -1
  387. package/dist/commands/channel/index.d.ts +0 -3
  388. package/dist/commands/channel/index.d.ts.map +0 -1
  389. package/dist/commands/channel/index.js.map +0 -1
  390. package/dist/commands/channel/interrupt.d.ts.map +0 -1
  391. package/dist/commands/channel/interrupt.js +0 -22
  392. package/dist/commands/channel/interrupt.js.map +0 -1
  393. package/dist/commands/channel/kill.d.ts +0 -7
  394. package/dist/commands/channel/kill.d.ts.map +0 -1
  395. package/dist/commands/channel/kill.js.map +0 -1
  396. package/dist/commands/channel/list.d.ts +0 -18
  397. package/dist/commands/channel/list.d.ts.map +0 -1
  398. package/dist/commands/channel/list.js.map +0 -1
  399. package/dist/commands/channel/messages.d.ts.map +0 -1
  400. package/dist/commands/channel/messages.js.map +0 -1
  401. package/dist/commands/channel/rm.d.ts +0 -27
  402. package/dist/commands/channel/rm.d.ts.map +0 -1
  403. package/dist/commands/channel/rm.js.map +0 -1
  404. package/dist/commands/channel/run.d.ts +0 -32
  405. package/dist/commands/channel/run.js +0 -141
  406. package/dist/commands/channel/run.js.map +0 -1
  407. package/dist/commands/channel/send.d.ts.map +0 -1
  408. package/dist/commands/channel/send.js.map +0 -1
  409. package/dist/commands/channel/spawn.d.ts.map +0 -1
  410. package/dist/commands/channel/spawn.js.map +0 -1
  411. package/dist/commands/channel/store/events.d.ts +0 -22
  412. package/dist/commands/channel/store/events.d.ts.map +0 -1
  413. package/dist/commands/channel/store/events.js.map +0 -1
  414. package/dist/commands/channel/store/filter.d.ts +0 -3
  415. package/dist/commands/channel/store/filter.d.ts.map +0 -1
  416. package/dist/commands/channel/store/filter.js +0 -2
  417. package/dist/commands/channel/store/filter.js.map +0 -1
  418. package/dist/commands/channel/store/lock.d.ts.map +0 -1
  419. package/dist/commands/channel/store/lock.js.map +0 -1
  420. package/dist/commands/channel/store/paths.d.ts.map +0 -1
  421. package/dist/commands/channel/store/paths.js.map +0 -1
  422. package/dist/commands/channel/store/schema.d.ts +0 -27
  423. package/dist/commands/channel/store/schema.d.ts.map +0 -1
  424. package/dist/commands/channel/store/schema.js +0 -34
  425. package/dist/commands/channel/store/schema.js.map +0 -1
  426. package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
  427. package/dist/commands/channel/store/thread-state.js.map +0 -1
  428. package/dist/commands/channel/store/watch.d.ts +0 -19
  429. package/dist/commands/channel/store/watch.d.ts.map +0 -1
  430. package/dist/commands/channel/store/watch.js.map +0 -1
  431. package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
  432. package/dist/commands/channel/supervisor/idle.js.map +0 -1
  433. package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
  434. package/dist/commands/channel/supervisor/inbox.js.map +0 -1
  435. package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
  436. package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
  437. package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
  438. package/dist/commands/channel/supervisor/stdout.js.map +0 -1
  439. package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
  440. package/dist/commands/channel/supervisor/turns.js.map +0 -1
  441. package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
  442. package/dist/commands/channel/supervisor/warning.js.map +0 -1
  443. package/dist/commands/channel/supervisor.d.ts.map +0 -1
  444. package/dist/commands/channel/supervisor.js.map +0 -1
  445. package/dist/commands/channel/text-body.d.ts +0 -13
  446. package/dist/commands/channel/text-body.d.ts.map +0 -1
  447. package/dist/commands/channel/text-body.js.map +0 -1
  448. package/dist/commands/channel/threads.d.ts +0 -39
  449. package/dist/commands/channel/threads.d.ts.map +0 -1
  450. package/dist/commands/channel/threads.js.map +0 -1
  451. package/dist/commands/channel/title.d.ts +0 -12
  452. package/dist/commands/channel/title.d.ts.map +0 -1
  453. package/dist/commands/channel/title.js +0 -24
  454. package/dist/commands/channel/title.js.map +0 -1
  455. package/dist/commands/channel/wait.d.ts.map +0 -1
  456. package/dist/commands/channel/wait.js.map +0 -1
  457. package/dist/commands/channel/workers.d.ts +0 -9
  458. package/dist/commands/channel/workers.d.ts.map +0 -1
  459. package/dist/commands/channel/workers.js +0 -31
  460. package/dist/commands/channel/workers.js.map +0 -1
  461. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
  462. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
  463. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
  464. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
  465. package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -222
  466. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
  467. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
  468. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
  469. package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
  470. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  471. package/dist/templates/trellis/agents/check.md +0 -70
  472. package/dist/templates/trellis/agents/implement.md +0 -71
  473. package/dist/templates/trellis/agents/subnode.env +0 -4
  474. package/dist/templates/trellis/agents/subnode.md +0 -76
  475. package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
  476. package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
  477. package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
  478. package/dist/templates/trellis/scripts/subnode_artifact.py +0 -735
  479. package/dist/templates/trellis/scripts/workspace_note.py +0 -126
  480. /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
  481. /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
  482. /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
  483. /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
  484. /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
@@ -2,66 +2,62 @@ import chalk from "chalk";
2
2
  import { InvalidArgumentError } from "commander";
3
3
  import { isProvider, listProviders } from "./adapters/index.js";
4
4
  import { parseCodexSandboxMode } from "./adapters/codex.js";
5
- import { channelContextAdd, channelContextDelete, channelContextList, } from "./context.js";
6
- import { createChannel } from "./create.js";
5
+ import { teamworkSessionContextAdd, teamworkSessionContextDelete, teamworkSessionContextList, } from "./context.js";
6
+ import { createTeamworkSession } from "./create.js";
7
7
  import { parseTrace } from "./dev-parse-trace.js";
8
- import { channelKill } from "./kill.js";
9
- import { channelInterrupt } from "./interrupt.js";
10
- import { channelList } from "./list.js";
11
- import { channelMessages } from "./messages.js";
12
- import { channelPrune, channelRm } from "./rm.js";
13
- import { channelSend } from "./send.js";
14
- import { channelRun } from "./run.js";
15
- import { channelSpawn } from "./spawn.js";
16
- import { channelWorkers } from "./workers.js";
17
- import { channelThreadPost, channelThreadRename, channelThreadShow, channelForumList, } from "./threads.js";
18
- import { channelTitleClear, channelTitleSet } from "./title.js";
8
+ import { teamworkSessionKill } from "./kill.js";
9
+ import { teamworkSessionInterrupt } from "./interrupt.js";
10
+ import { teamworkSessionList } from "./list.js";
11
+ import { teamworkSessionMessages } from "./messages.js";
12
+ import { teamworkSessionPrune, teamworkSessionRm } from "./rm.js";
13
+ import { teamworkSessionSend } from "./send.js";
14
+ import { teamworkSessionRun } from "./run.js";
15
+ import { teamworkSessionSpawn } from "./spawn.js";
16
+ import { teamworkSessionThreadPost, teamworkSessionThreadRename, teamworkSessionThreadShow, teamworkSessionForumList, } from "./threads.js";
17
+ import { teamworkSessionTitleClear, teamworkSessionTitleSet } from "./title.js";
19
18
  import { runSupervisor } from "./supervisor.js";
20
- import { channelBarrier, channelWait, parseDuration } from "./wait.js";
19
+ import { teamworkSessionWait, parseDuration } from "./wait.js";
21
20
  import { parseCsv } from "./store/schema.js";
22
- import { parseInboxPolicy } from "@pennixrv/trellis-core/channel";
21
+ import { parseInboxPolicy } from "@pennixrv/trellis-core/teamwork";
23
22
  function parseNonNegativeInteger(value) {
24
23
  if (!/^\d+$/.test(value)) {
25
24
  throw new InvalidArgumentError(`expected a non-negative integer, got '${value}'`);
26
25
  }
27
26
  return Number(value);
28
27
  }
29
- export function registerChannelCommand(program) {
30
- const channel = program
31
- .command("channel")
32
- .description("Multi-agent collaboration runtime — spawn / coordinate / interrupt worker agents through a shared event log");
33
- channel
28
+ export function registerTeamworkCommand(program) {
29
+ const teamwork = program
30
+ .command("teamwork")
31
+ .description("Trellis Teamwork runtime — coordinate teammates through a shared event log");
32
+ teamwork
34
33
  .command("create <name>")
35
- .description("Create a new channel (collaboration session)")
36
- .option("--scope <scope>", "channel scope: project | global")
37
- .option("--type <type>", "channel type: chat | forum", "chat")
34
+ .description("Create a Teamwork session")
35
+ .option("--scope <scope>", "Teamwork session scope: project | global")
36
+ .option("--type <type>", "session type: chat | forum", "chat")
38
37
  .option("--task <path>", "associated Trellis task directory")
39
38
  .option("--project <slug>", "project slug")
40
39
  .option("--labels <csv>", "comma-separated labels")
41
- .option("--description <text>", "stable channel description")
42
- .option("--context-file <absolute-path>", "absolute file path attached as channel context (repeatable)", (val, prev) => [...(prev ?? []), val], [])
43
- .option("--context-raw <text>", "raw channel context text (repeatable)", (val, prev) => [...(prev ?? []), val], [])
44
- .option("--linked-context-file <absolute-path>", "[deprecated alias for --context-file] absolute file path (repeatable)", (val, prev) => [...(prev ?? []), val], [])
45
- .option("--linked-context-raw <text>", "[deprecated alias for --context-raw] raw context text (repeatable)", (val, prev) => [...(prev ?? []), val], [])
40
+ .option("--description <text>", "stable Teamwork session description")
41
+ .option("--context-file <absolute-path>", "absolute file path attached as Teamwork session context (repeatable)", (val, prev) => [...(prev ?? []), val], [])
42
+ .option("--context-raw <text>", "raw Teamwork session context text (repeatable)", (val, prev) => [...(prev ?? []), val], [])
46
43
  .option("--cwd <path>", "working directory recorded in the create event")
47
44
  .option("--by <agent>", "agent name recorded as the creator", "main")
48
- .option("--owner-session <id>", "opaque main Codex session owner (defaults to host session env)")
49
- .option("--force", "overwrite existing channel with the same name")
50
- .option("--ephemeral", "mark as ephemeral — hidden from `channel list` by default and cleanable via `channel prune --ephemeral`")
45
+ .option("--force", "overwrite an existing Teamwork session with the same name")
46
+ .option("--ephemeral", "mark as ephemeral — hidden from `teamwork list` by default and cleanable via `teamwork prune --ephemeral`")
51
47
  .action(async (name, opts) => {
52
48
  try {
53
- await createChannel(name, opts);
49
+ await createTeamworkSession(name, opts);
54
50
  }
55
51
  catch (err) {
56
52
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
57
53
  process.exit(1);
58
54
  }
59
55
  });
60
- channel
56
+ teamwork
61
57
  .command("send <name>")
62
- .description("Send a message into the channel")
58
+ .description("Send a message in a Teamwork session")
63
59
  .requiredOption("--as <agent>", "agent name sending")
64
- .option("--scope <scope>", "channel scope: project | global")
60
+ .option("--scope <scope>", "Teamwork session scope: project | global")
65
61
  .option("--to <agents>", "comma-separated target agents (default: broadcast)")
66
62
  .option("--stdin", "read message body from stdin")
67
63
  .option("--text-file <path>", "read message body from file")
@@ -70,7 +66,7 @@ export function registerChannelCommand(program) {
70
66
  .action(async (name, text, raw) => {
71
67
  const opts = raw;
72
68
  try {
73
- await channelSend(name, {
69
+ await teamworkSessionSend(name, {
74
70
  as: opts.as,
75
71
  text,
76
72
  stdin: opts.stdin,
@@ -85,27 +81,12 @@ export function registerChannelCommand(program) {
85
81
  process.exit(1);
86
82
  }
87
83
  });
88
- channel
89
- .command("barrier <name>")
90
- .description("Print the current durable event sequence without appending an event")
91
- .option("--scope <scope>", "channel scope: project | global")
92
- .action(async (name, raw) => {
93
- const opts = raw;
94
- try {
95
- console.log(await channelBarrier(name, { scope: opts.scope }));
96
- }
97
- catch (err) {
98
- console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
99
- process.exit(1);
100
- }
101
- });
102
- channel
84
+ teamwork
103
85
  .command("wait <name>")
104
86
  .description("Block until an event matching the filter arrives, or timeout")
105
87
  .requiredOption("--as <agent>", "agent name waiting")
106
- .option("--scope <scope>", "channel scope: project | global")
88
+ .option("--scope <scope>", "Teamwork session scope: project | global")
107
89
  .option("--timeout <duration>", "max wait (e.g. 30s, 2m, 1h)")
108
- .option("--after-seq <sequence>", "replay only events after this durable sequence barrier", parseNonNegativeInteger)
109
90
  .option("--from <agents>", "only wake on events from these agents (CSV)")
110
91
  .option("--kind <kind[,kind...]>", "only wake on these event kinds (CSV, OR semantics)")
111
92
  .option("--thread <key>", "only wake on this thread key")
@@ -116,10 +97,9 @@ export function registerChannelCommand(program) {
116
97
  .action(async (name, raw) => {
117
98
  const opts = raw;
118
99
  try {
119
- await channelWait(name, {
100
+ await teamworkSessionWait(name, {
120
101
  as: opts.as,
121
102
  timeoutMs: parseDuration(opts.timeout),
122
- afterSeq: opts.afterSeq,
123
103
  from: opts.from,
124
104
  kind: opts.kind,
125
105
  scope: opts.scope,
@@ -135,19 +115,19 @@ export function registerChannelCommand(program) {
135
115
  process.exit(1);
136
116
  }
137
117
  });
138
- channel
118
+ teamwork
139
119
  .command("interrupt <name>")
140
- .description("Interrupt a worker turn and send a replacement instruction")
120
+ .description("Interrupt a teammate turn and send a replacement instruction")
141
121
  .requiredOption("--as <agent>", "agent name requesting the interrupt")
142
- .requiredOption("--to <agent>", "target worker name")
143
- .option("--scope <scope>", "channel scope: project | global")
122
+ .requiredOption("--to <agent>", "target teammate name")
123
+ .option("--scope <scope>", "Teamwork session scope: project | global")
144
124
  .option("--stdin", "read interrupt message body from stdin")
145
125
  .option("--text-file <path>", "read interrupt message body from file")
146
126
  .argument("[text]", "inline interrupt message (otherwise use --stdin / --text-file)")
147
127
  .action(async (name, text, raw) => {
148
128
  const opts = raw;
149
129
  try {
150
- await channelInterrupt(name, {
130
+ await teamworkSessionInterrupt(name, {
151
131
  as: opts.as,
152
132
  to: opts.to,
153
133
  text,
@@ -161,25 +141,25 @@ export function registerChannelCommand(program) {
161
141
  process.exit(1);
162
142
  }
163
143
  });
164
- channel
144
+ teamwork
165
145
  .command("spawn <name>")
166
- .description("Register a worker (claude/codex) into the channel — the worker stays idle until the first `channel send --to <worker>` arrives")
167
- .option("--scope <scope>", "channel scope: project | global")
146
+ .description("Register a teammate process (claude/codex) in a Teamwork session — it stays idle until the first `teamwork send --to <teammate>` arrives")
147
+ .option("--scope <scope>", "Teamwork session scope: project | global")
168
148
  .option("--agent <agent-name>", "load .trellis/agents/<name>.md (sets default --provider / --model / system prompt)")
169
- .option("--provider <provider>", "worker provider: claude | codex (overrides agent)")
170
- .option("--as <name>", "worker name in the channel (default: <agent-name> if --agent is set)")
171
- .option("--cwd <path>", "worker working directory (default: process cwd)")
149
+ .option("--provider <provider>", "teammate provider: claude | codex (overrides agent)")
150
+ .option("--as <name>", "teammate name in the Teamwork session (default: <agent-name> if --agent is set)")
151
+ .option("--cwd <path>", "teammate working directory (default: process cwd)")
172
152
  .option("--model <id>", "model override")
173
153
  .option("--resume <id>", "resume an existing session/thread id")
174
- .option("--sandbox <mode>", "codex-only: worker sandbox mode: read-only | workspace-write | danger-full-access (default workspace-write)")
175
- .option("--timeout <duration>", "auto-kill worker after this duration (subnode role default comes from config)")
176
- .option("--warn-before <duration>", "emit supervisor_warning before timeout (subnode role default comes from config)")
177
- .option("--file <path>", "include a file's content as context in the worker's system prompt (glob supported, repeatable)", (val, prev) => [...(prev ?? []), val], [])
154
+ .option("--sandbox <mode>", "codex-only: teammate sandbox mode: read-only | workspace-write | danger-full-access (default workspace-write)")
155
+ .option("--timeout <duration>", "auto-kill teammate process after this duration (e.g. 30m, 1h, 7200s)")
156
+ .option("--warn-before <duration>", "emit supervisor_warning before timeout (default 5m; 0ms disables)")
157
+ .option("--file <path>", "include a file's content as context in the teammate's system prompt (glob supported, repeatable)", (val, prev) => [...(prev ?? []), val], [])
178
158
  .option("--jsonl <path>", "parse a Trellis jsonl manifest ({file, reason} per line) and include each referenced file (repeatable)", (val, prev) => [...(prev ?? []), val], [])
179
- .option("--by <agent>", "identity recorded as the spawn author (defaults to TRELLIS_CHANNEL_AS env or 'main')")
180
- .option("--inbox-policy <policy>", "worker inbox delivery policy: explicitOnly | broadcastAndExplicit (default explicitOnly)")
181
- .option("--idle-timeout <duration>", "OOM-guard idle-cleanup TTL (subnode role default comes from config)")
182
- .option("--max-live-workers <n>", "spawn-time live-worker budget (subnode role default comes from config)", parseNonNegativeInteger)
159
+ .option("--by <agent>", "identity recorded as the spawn author (defaults to TRELLIS_TEAMWORK_AS env or 'main')")
160
+ .option("--inbox-policy <policy>", "teammate inbox delivery policy: explicitOnly | broadcastAndExplicit (default explicitOnly)")
161
+ .option("--idle-timeout <duration>", "OOM-guard idle-cleanup TTL for this teammate (default 5m; 0 disables)")
162
+ .option("--max-live-teammates <n>", "spawn-time live-teammate budget for this project/scope (default 6; 0 disables)", parseNonNegativeInteger)
183
163
  .action(async (name, raw) => {
184
164
  const opts = raw;
185
165
  if (opts.provider !== undefined && !isProvider(opts.provider)) {
@@ -188,7 +168,7 @@ export function registerChannelCommand(program) {
188
168
  }
189
169
  try {
190
170
  const sandbox = parseCodexSandboxMode(opts.sandbox);
191
- await channelSpawn(name, {
171
+ await teamworkSessionSpawn(name, {
192
172
  agent: opts.agent,
193
173
  provider: opts.provider,
194
174
  as: opts.as,
@@ -204,7 +184,7 @@ export function registerChannelCommand(program) {
204
184
  scope: opts.scope,
205
185
  inboxPolicy: parseInboxPolicy(opts.inboxPolicy),
206
186
  idleTimeoutMs: parseDuration(opts.idleTimeout),
207
- maxLiveWorkers: opts.maxLiveWorkers,
187
+ maxLiveWorkers: opts.maxLiveTeammates,
208
188
  });
209
189
  }
210
190
  catch (err) {
@@ -212,38 +192,32 @@ export function registerChannelCommand(program) {
212
192
  process.exit(1);
213
193
  }
214
194
  });
215
- channel
216
- .command("workers <name>")
217
- .description("Show durable worker lifecycle projections for a channel")
218
- .option("--scope <scope>", "channel scope: project | global")
219
- .option("--project-key <key>", "project bucket containing the channel (project scope only)")
220
- .option("--include-terminal", "include done, error, killed, and crashed workers")
221
- .option("--json", "print the complete worker projection as JSON")
222
- .action(async (name, raw) => {
223
- const opts = raw;
195
+ teamwork
196
+ .command("batch <plan>")
197
+ .description("Submit one frozen Teamwork plan; requires an installed host adapter")
198
+ .action(async (_planPath) => {
224
199
  try {
225
- await channelWorkers(name, opts);
200
+ throw new Error("no verified teammate host adapter is installed; batch dispatch refused before writing coordination state");
226
201
  }
227
202
  catch (err) {
228
203
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
229
204
  process.exit(1);
230
205
  }
231
206
  });
232
- channel
207
+ teamwork
233
208
  .command("run [name]")
234
- .description("One-shot: create ephemeral channel, spawn worker, send prompt, wait done, print final answer, cleanup")
209
+ .description("One-shot: create an ephemeral Teamwork session, start a teammate, send the prompt, wait for completion, print the answer, and clean up")
235
210
  .option("--agent <agent-name>", "load .trellis/agents/<name>.md (sets default --provider / --as / system prompt)")
236
- .option("--provider <provider>", "worker provider: claude | codex (overrides agent)")
237
- .option("--as <name>", "worker name (default: agent name if --agent set)")
238
- .option("--cwd <path>", "worker working directory")
211
+ .option("--provider <provider>", "teammate provider: claude | codex (overrides agent)")
212
+ .option("--as <name>", "teammate name (default: agent name if --agent set)")
213
+ .option("--cwd <path>", "teammate working directory")
239
214
  .option("--model <id>", "model override")
240
215
  .option("--file <path>", "include a file as context (glob supported, repeatable)", (val, prev) => [...(prev ?? []), val], [])
241
216
  .option("--jsonl <path>", "parse a Trellis jsonl manifest and include each referenced file (repeatable)", (val, prev) => [...(prev ?? []), val], [])
242
217
  .option("--message <text>", "inline prompt text")
243
218
  .option("--message-file <path>", "read prompt body from file")
244
219
  .option("--stdin", "read prompt body from stdin")
245
- .option("--owner-session <id>", "opaque main Codex session owner (defaults to host session env)")
246
- .option("--timeout <duration>", "max time to wait for done (e.g. 30s, 5m, 1h; default 5m, or channel.subnode.timeout for --agent subnode)")
220
+ .option("--timeout <duration>", "max time to wait for done (e.g. 30s, 5m, 1h; default 5m)")
247
221
  .action(async (name, raw) => {
248
222
  const opts = raw;
249
223
  if (opts.provider !== undefined && !isProvider(opts.provider)) {
@@ -251,7 +225,7 @@ export function registerChannelCommand(program) {
251
225
  process.exit(1);
252
226
  }
253
227
  try {
254
- await channelRun({
228
+ await teamworkSessionRun({
255
229
  name,
256
230
  agent: opts.agent,
257
231
  provider: opts.provider,
@@ -264,7 +238,6 @@ export function registerChannelCommand(program) {
264
238
  textFile: opts.messageFile,
265
239
  stdin: opts.stdin,
266
240
  timeoutMs: parseDuration(opts.timeout),
267
- ownerSession: opts.ownerSession,
268
241
  });
269
242
  }
270
243
  catch (err) {
@@ -272,34 +245,34 @@ export function registerChannelCommand(program) {
272
245
  process.exit(1);
273
246
  }
274
247
  });
275
- channel
248
+ teamwork
276
249
  .command("rm <name>")
277
- .description("Kill workers and delete a channel directory entirely")
278
- .option("--scope <scope>", "channel scope: project | global")
250
+ .description("Stop teammate processes and delete a Teamwork session entirely")
251
+ .option("--scope <scope>", "Teamwork session scope: project | global")
279
252
  .action(async (name, raw) => {
280
253
  try {
281
- await channelRm(name, raw);
254
+ await teamworkSessionRm(name, raw);
282
255
  }
283
256
  catch (err) {
284
257
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
285
258
  process.exit(1);
286
259
  }
287
260
  });
288
- channel
261
+ teamwork
289
262
  .command("prune")
290
- .description("Bulk-remove channels by criteria (defaults to dry-run preview)")
291
- .option("--scope <scope>", "channel scope: project | global")
292
- .option("--all", "remove all channels (except live ones and --keep)")
293
- .option("--empty", "remove channels with no activity (only create event)")
294
- .option("--idle <duration>", "remove channels whose last event is older than this (e.g. 1h, 7d)")
295
- .option("--ephemeral", "remove only channels marked `--ephemeral` at create time")
263
+ .description("Bulk-remove Teamwork sessions by criteria (defaults to dry-run preview)")
264
+ .option("--scope <scope>", "Teamwork session scope: project | global")
265
+ .option("--all", "remove all Teamwork sessions (except live ones and --keep)")
266
+ .option("--empty", "remove Teamwork sessions with no activity (only create event)")
267
+ .option("--idle <duration>", "remove sessions whose last event is older than this (e.g. 1h, 7d)")
268
+ .option("--ephemeral", "remove only sessions marked `--ephemeral` at create time")
296
269
  .option("--yes", "actually delete (default is dry-run)")
297
270
  .option("--dry-run", "show what would be removed without deleting", true)
298
- .option("--keep <names>", "comma-separated channel names to keep regardless")
271
+ .option("--keep <names>", "comma-separated Teamwork session names to keep regardless")
299
272
  .action(async (raw) => {
300
273
  const opts = raw;
301
274
  try {
302
- await channelPrune({
275
+ await teamworkSessionPrune({
303
276
  all: opts.all,
304
277
  empty: opts.empty,
305
278
  idleMs: parseDuration(opts.idle),
@@ -315,29 +288,28 @@ export function registerChannelCommand(program) {
315
288
  process.exit(1);
316
289
  }
317
290
  });
318
- channel
291
+ teamwork
319
292
  .command("list")
320
- .description("List channels in ~/.trellis/channels/ with worker / activity summary")
321
- .option("--scope <scope>", "channel scope: project | global")
293
+ .description("List Teamwork Sessions in ~/.trellis/teamwork/ with teammate and activity summary")
294
+ .option("--scope <scope>", "Teamwork session scope: project | global")
322
295
  .option("--json", "emit JSON instead of a formatted table")
323
- .option("--project <slug>", "filter channels whose `task` field contains this substring")
324
- .option("--all", "include ephemeral channels (default: hide channels marked ephemeral)")
296
+ .option("--project <slug>", "filter sessions whose `task` field contains this substring")
297
+ .option("--all", "include ephemeral sessions (default: hide sessions marked ephemeral)")
325
298
  .option("--all-projects", "scan every project bucket (default: only the current cwd's project)")
326
- .option("--owner-session <id>", "exactly match the immutable main Codex session owner")
327
299
  .action(async (raw) => {
328
300
  const opts = raw;
329
301
  try {
330
- await channelList(opts);
302
+ await teamworkSessionList(opts);
331
303
  }
332
304
  catch (err) {
333
305
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
334
306
  process.exit(1);
335
307
  }
336
308
  });
337
- channel
309
+ teamwork
338
310
  .command("messages <name>")
339
- .description("View messages and events in the channel")
340
- .option("--scope <scope>", "channel scope: project | global")
311
+ .description("View messages and events in a Teamwork session")
312
+ .option("--scope <scope>", "Teamwork session scope: project | global")
341
313
  .option("--raw", "print raw JSON (one event per line)")
342
314
  .option("--follow", "stream new events as they arrive (Ctrl-C to stop)")
343
315
  .option("--last <N>", "show only the last N matching events", (v) => Number.parseInt(v, 10))
@@ -351,7 +323,7 @@ export function registerChannelCommand(program) {
351
323
  .action(async (name, raw) => {
352
324
  const opts = raw;
353
325
  try {
354
- await channelMessages(name, {
326
+ await teamworkSessionMessages(name, {
355
327
  raw: opts.raw,
356
328
  follow: opts.follow,
357
329
  last: opts.last,
@@ -370,27 +342,27 @@ export function registerChannelCommand(program) {
370
342
  process.exit(1);
371
343
  }
372
344
  });
373
- channel
345
+ teamwork
374
346
  .command("kill <name>")
375
- .description("Stop a worker in the channel (SIGTERM, or SIGKILL with --force)")
376
- .requiredOption("--as <agent>", "worker agent name")
377
- .option("--scope <scope>", "channel scope: project | global")
347
+ .description("Stop a teammate process in the Teamwork session (SIGTERM, or SIGKILL with --force)")
348
+ .requiredOption("--as <agent>", "teammate agent name")
349
+ .option("--scope <scope>", "Teamwork session scope: project | global")
378
350
  .option("--force", "skip graceful shutdown, send SIGKILL immediately")
379
351
  .action(async (name, raw) => {
380
352
  const opts = raw;
381
353
  try {
382
- await channelKill(name, opts);
354
+ await teamworkSessionKill(name, opts);
383
355
  }
384
356
  catch (err) {
385
357
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
386
358
  process.exit(1);
387
359
  }
388
360
  });
389
- channel
361
+ teamwork
390
362
  .command("post <name> <action>")
391
- .description("Append a structured thread event to a forum channel")
363
+ .description("Append a structured thread event to a Teamwork forum")
392
364
  .requiredOption("--as <agent>", "agent name posting")
393
- .option("--scope <scope>", "channel scope: project | global")
365
+ .option("--scope <scope>", "Teamwork session scope: project | global")
394
366
  .option("--thread <key>", "thread key (required except opened)")
395
367
  .option("--title <text>", "thread title")
396
368
  .option("--text <text>", "event body")
@@ -403,11 +375,9 @@ export function registerChannelCommand(program) {
403
375
  .option("--summary <text>", "thread summary")
404
376
  .option("--context-file <absolute-path>", "absolute file path attached as thread context (repeatable)", (val, prev) => [...(prev ?? []), val], [])
405
377
  .option("--context-raw <text>", "raw thread context text (repeatable)", (val, prev) => [...(prev ?? []), val], [])
406
- .option("--linked-context-file <absolute-path>", "[deprecated alias for --context-file] absolute file path (repeatable)", (val, prev) => [...(prev ?? []), val], [])
407
- .option("--linked-context-raw <text>", "[deprecated alias for --context-raw] raw context text (repeatable)", (val, prev) => [...(prev ?? []), val], [])
408
378
  .action(async (name, action, raw) => {
409
379
  try {
410
- await channelThreadPost(name, {
380
+ await teamworkSessionThreadPost(name, {
411
381
  ...raw,
412
382
  action,
413
383
  });
@@ -417,32 +387,32 @@ export function registerChannelCommand(program) {
417
387
  process.exit(1);
418
388
  }
419
389
  });
420
- channel
390
+ teamwork
421
391
  .command("forum <name>")
422
- .description("List threads in a forum channel")
423
- .option("--scope <scope>", "channel scope: project | global")
392
+ .description("List threads in a Teamwork forum")
393
+ .option("--scope <scope>", "Teamwork session scope: project | global")
424
394
  .option("--status <status>", "filter by thread status")
425
395
  .option("--raw", "print raw reduced thread JSON")
426
396
  .action(async (name, raw) => {
427
397
  try {
428
- await channelForumList(name, raw);
398
+ await teamworkSessionForumList(name, raw);
429
399
  }
430
400
  catch (err) {
431
401
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
432
402
  process.exit(1);
433
403
  }
434
404
  });
435
- const thread = channel
405
+ const thread = teamwork
436
406
  .command("thread")
437
407
  .description("Show or mutate one thread timeline");
438
408
  thread
439
- .argument("<name>", "channel name")
409
+ .argument("<name>", "Teamwork session name")
440
410
  .argument("<thread>", "thread key")
441
- .option("--scope <scope>", "channel scope: project | global")
411
+ .option("--scope <scope>", "Teamwork session scope: project | global")
442
412
  .option("--raw", "print raw thread events")
443
413
  .action(async (name, threadKey, raw) => {
444
414
  try {
445
- await channelThreadShow(name, threadKey, raw);
415
+ await teamworkSessionThreadShow(name, threadKey, raw);
446
416
  }
447
417
  catch (err) {
448
418
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
@@ -451,33 +421,33 @@ export function registerChannelCommand(program) {
451
421
  });
452
422
  thread
453
423
  .command("rename <name> <oldThread> <newThread>")
454
- .description("Rename a thread inside a forum channel")
424
+ .description("Rename a thread inside a Teamwork forum")
455
425
  .requiredOption("--as <agent>", "agent name")
456
- .option("--scope <scope>", "channel scope: project | global")
426
+ .option("--scope <scope>", "Teamwork session scope: project | global")
457
427
  .action(async (name, oldThread, newThread, raw) => {
458
428
  const opts = raw;
459
429
  try {
460
- await channelThreadRename(name, oldThread, newThread, opts);
430
+ await teamworkSessionThreadRename(name, oldThread, newThread, opts);
461
431
  }
462
432
  catch (err) {
463
433
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
464
434
  process.exit(1);
465
435
  }
466
436
  });
467
- const context = channel
437
+ const context = teamwork
468
438
  .command("context")
469
- .description("Manage channel-level or thread-level context entries");
439
+ .description("Manage Teamwork session-level or thread-level context entries");
470
440
  const addContextOptions = (cmd) => cmd
471
441
  .option("--as <agent>", "agent name", "main")
472
- .option("--scope <scope>", "channel scope: project | global")
473
- .option("--thread <key>", "mutate thread-level context instead of channel-level")
442
+ .option("--scope <scope>", "Teamwork session scope: project | global")
443
+ .option("--thread <key>", "mutate thread-level context instead of Teamwork session-level")
474
444
  .option("--file <absolute-path>", "absolute file path (repeatable)", (val, prev) => [...(prev ?? []), val], [])
475
445
  .option("--raw <text>", "raw text entry (repeatable)", (val, prev) => [...(prev ?? []), val], []);
476
446
  addContextOptions(context.command("add <name>"))
477
447
  .description("Add context entries")
478
448
  .action(async (name, raw) => {
479
449
  try {
480
- await channelContextAdd(name, raw);
450
+ await teamworkSessionContextAdd(name, raw);
481
451
  }
482
452
  catch (err) {
483
453
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
@@ -488,7 +458,7 @@ export function registerChannelCommand(program) {
488
458
  .description("Delete context entries")
489
459
  .action(async (name, raw) => {
490
460
  try {
491
- await channelContextDelete(name, raw);
461
+ await teamworkSessionContextDelete(name, raw);
492
462
  }
493
463
  catch (err) {
494
464
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
@@ -498,31 +468,31 @@ export function registerChannelCommand(program) {
498
468
  context
499
469
  .command("list <name>")
500
470
  .description("List projected current context entries")
501
- .option("--scope <scope>", "channel scope: project | global")
502
- .option("--thread <key>", "show thread-level context instead of channel-level")
471
+ .option("--scope <scope>", "Teamwork session scope: project | global")
472
+ .option("--thread <key>", "show thread-level context instead of Teamwork session-level")
503
473
  .option("--raw", "print one context entry JSON per line")
504
474
  .action(async (name, raw) => {
505
475
  try {
506
- await channelContextList(name, raw);
476
+ await teamworkSessionContextList(name, raw);
507
477
  }
508
478
  catch (err) {
509
479
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
510
480
  process.exit(1);
511
481
  }
512
482
  });
513
- const title = channel
483
+ const title = teamwork
514
484
  .command("title")
515
- .description("Set or clear the channel display title");
485
+ .description("Set or clear the Teamwork session title");
516
486
  title
517
487
  .command("set <name>")
518
- .description("Set the channel display title")
488
+ .description("Set the Teamwork session title")
519
489
  .option("--as <agent>", "agent name", "main")
520
- .option("--scope <scope>", "channel scope: project | global")
490
+ .option("--scope <scope>", "Teamwork session scope: project | global")
521
491
  .requiredOption("--title <text>", "display title")
522
492
  .action(async (name, raw) => {
523
493
  const opts = raw;
524
494
  try {
525
- await channelTitleSet(name, opts);
495
+ await teamworkSessionTitleSet(name, opts);
526
496
  }
527
497
  catch (err) {
528
498
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
@@ -531,25 +501,25 @@ export function registerChannelCommand(program) {
531
501
  });
532
502
  title
533
503
  .command("clear <name>")
534
- .description("Clear the channel display title")
504
+ .description("Clear the Teamwork session title")
535
505
  .option("--as <agent>", "agent name", "main")
536
- .option("--scope <scope>", "channel scope: project | global")
506
+ .option("--scope <scope>", "Teamwork session scope: project | global")
537
507
  .action(async (name, raw) => {
538
508
  try {
539
- await channelTitleClear(name, raw);
509
+ await teamworkSessionTitleClear(name, raw);
540
510
  }
541
511
  catch (err) {
542
512
  console.error(chalk.red("Error:"), err instanceof Error ? err.message : err);
543
513
  process.exit(1);
544
514
  }
545
515
  });
546
- // Hidden: supervisor entry point invoked by `channel spawn` via fork.
547
- channel
548
- .command("__supervisor <channel> <worker> <config>")
516
+ // Hidden: supervisor entry point invoked by `teamwork spawn` via fork.
517
+ teamwork
518
+ .command("__supervisor <teamwork-session> <teammate> <config>")
549
519
  .description("[internal] supervisor process entry point — do not invoke directly")
550
- .action(async (channelName, worker, configPath) => {
520
+ .action(async (sessionId, teammateName, configPath) => {
551
521
  try {
552
- await runSupervisor(channelName, worker, configPath);
522
+ await runSupervisor(sessionId, teammateName, configPath);
553
523
  }
554
524
  catch (err) {
555
525
  console.error(chalk.red("Supervisor error:"), err instanceof Error ? err.message : err);
@@ -557,9 +527,9 @@ export function registerChannelCommand(program) {
557
527
  }
558
528
  });
559
529
  // Dev-only: feed a recorded stream-json / wire trace through the matching
560
- // adapter and print the resulting channel events. Used during adapter
530
+ // adapter and print the resulting Teamwork events. Used during adapter
561
531
  // development to verify against real-CLI fixtures.
562
- channel
532
+ teamwork
563
533
  .command("__parse-trace <adapter> <file>")
564
534
  .description("[dev] Run a recorded trace through the parser and print events")
565
535
  .action((adapter, file) => {