@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
@@ -1,295 +0,0 @@
1
- # Workers And Agent Cards
2
-
3
- Use workers when a peer agent should execute independently and report back
4
- through the channel event log. A worker is a registered child process (claude
5
- or codex) attached to a channel; the supervisor forwards inbox messages to it
6
- and translates its output back into channel events.
7
-
8
- ## Spawn
9
-
10
- ```bash
11
- trellis channel create impl-task --by dispatcher --cwd /path/to/repo
12
- trellis channel spawn impl-task --provider codex --as codex-impl --timeout 30m
13
-
14
- echo "Implement the schema for table X per .trellis/.../prd.md" \
15
- | trellis channel send impl-task --as dispatcher --to codex-impl --stdin
16
-
17
- trellis channel wait impl-task --as dispatcher --from codex-impl --kind done --timeout 30m
18
- ```
19
-
20
- `spawn` forks a `channel __supervisor` worker that emits `spawned`, streams
21
- `progress`, and should end with `done`, `error`, or `killed`. Workers stay
22
- inbox-idle until a `send --to <worker>` (or a broadcast when
23
- `--inbox-policy broadcastAndExplicit` is set) wakes them.
24
-
25
- Key `spawn` flags:
26
-
27
- - `--agent <name>` — load `.trellis/agents/<name>.md` (provider/model/as/system prompt defaults).
28
- - `--provider <claude|codex>` — overrides the agent card; validated against the adapter registry.
29
- - `--as <name>` — channel worker handle; defaults to the agent name.
30
- - `--cwd <path>` — worker working directory (also the jail root for `--file`/`--jsonl`).
31
- - `--model <id>` — model override.
32
- - `--resume <id>` — resume an existing claude session / codex thread.
33
- - `--timeout <duration>` — auto-kill after `30s` / `2m` / `1h`.
34
- - `--warn-before <duration>` — supervisor_warning lead time (default `5m`; `0ms` disables).
35
- - `--file <path>` (repeatable, glob-supported) — inject file content into the system prompt.
36
- - `--jsonl <path>` (repeatable) — Trellis jsonl manifest (`{file, reason}` per line).
37
- - `--by <agent>` — author of the `spawned` event (defaults to `$TRELLIS_CHANNEL_AS` or `main`).
38
- - `--inbox-policy <explicitOnly|broadcastAndExplicit>` — default `explicitOnly`.
39
- - `--idle-timeout <duration>` — OOM guard idle TTL (default `5m`; `0` disables).
40
- - `--max-live-workers <n>` — spawn-time live-worker budget (default `6`; `0` disables).
41
-
42
- An agent card may declare `env_file: <file>`; the channel runtime loads that
43
- relative sibling file automatically for the provider child. Use this for
44
- stable role settings so every spawn of that role gets the same environment.
45
- The file contains plain `KEY=VALUE` lines only; it is not shell code and does
46
- not perform expansion or interpolation. Do not put credentials in a bundled
47
- role file. The bundled `subnode` role uses this mechanism to disable
48
- OpenViking's automatic recall, capture, and fixed background injection in the
49
- evidence worker process.
50
-
51
- The success event `spawned` records `pid`, `provider`, `agent`, the injected
52
- `files`, and the resolved `manifests` so later spectators can audit context.
53
-
54
- ## Agent Cards
55
-
56
- `--agent <name>` resolves to `.trellis/agents/<name>.md`. The card name must
57
- match `[A-Za-z0-9._-]+`. The default Trellis install ships three cards:
58
-
59
- - `.trellis/agents/check.md` — code-quality reviewer.
60
- - `.trellis/agents/implement.md` — coding worker for implementation runs.
61
- - `.trellis/agents/subnode.md` — bounded independent-evidence worker; its
62
- `subnode.env` sibling is loaded automatically.
63
-
64
- ```yaml
65
- ---
66
- name: check
67
- description: Code quality check expert.
68
- provider: claude
69
- ---
70
- ```
71
-
72
- Frontmatter fields populate `spawn` defaults (provider, model, `as`); the
73
- markdown body becomes the worker's system-prompt role. Cards do **not**
74
- auto-attach task files — context must be injected explicitly per spawn (see
75
- below).
76
-
77
- Always inspect project cards before spawning a named agent:
78
-
79
- ```bash
80
- ls .trellis/agents
81
- sed -n '1,100p' .trellis/agents/check.md
82
- ```
83
-
84
- ## Context Injection
85
-
86
- Two flags inject content into the worker's system prompt under a
87
- `# CONTEXT FILES` block, assembled by `context-loader`:
88
-
89
- - `--file <path>` — repeatable, glob-supported (`*`, `**`). Each match is
90
- read and concatenated.
91
- - `--jsonl <path>` — repeatable Trellis manifest where every line is
92
- `{"file":"<path>","reason":"<why>"}`. The reason is preserved as a header
93
- comment above each file's content.
94
-
95
- Limits enforced by the loader:
96
-
97
- - 1 MB hard cap per file (oversize → error).
98
- - 200 KB per-file warning to stderr.
99
- - 500 KB total assembled-context warning to stderr.
100
- - Path-traversal jail: all resolved paths must stay under `--cwd`.
101
-
102
- Example spawning a check agent against a task directory:
103
-
104
- ```bash
105
- TASK=.trellis/tasks/05-13-example
106
- trellis channel spawn cr-example --agent check --provider codex --as check-cx \
107
- --file "$TASK/prd.md" \
108
- --file "$TASK/design.md" \
109
- --file "$TASK/implement.md" \
110
- --jsonl "$TASK/check.jsonl" \
111
- --cwd "$PWD" --timeout 30m
112
- ```
113
-
114
- The `spawned` event records both the literal `files` array and any `manifests`
115
- expanded from `--jsonl`, so the audit trail captures whatever the worker was
116
- actually shown.
117
-
118
- ## Names And Routing
119
-
120
- `--as` has two meanings:
121
-
122
- - `send` / `wait` / `interrupt`: speaker identity (author of the resulting event).
123
- - `spawn`: the worker handle that other agents address with `--to`.
124
-
125
- Use explicit names when multiple workers or providers participate in one
126
- channel:
127
-
128
- ```bash
129
- trellis channel spawn cr-feature --agent check --as check-claude
130
- trellis channel spawn cr-feature --agent check --provider codex --as check-cx
131
-
132
- trellis channel wait cr-feature --as main \
133
- --from check-claude,check-cx --kind done --all --timeout 15m
134
- ```
135
-
136
- `--all` requires `--from` and blocks until every listed worker has produced a
137
- matching event; timeout exits with code **124** and prints
138
- `timeout: still waiting on ...` to stderr.
139
-
140
- ## Soft Interrupt — `interrupt`
141
-
142
- `channel interrupt` is the cooperative redirect: it appends an `interrupt`
143
- event (reason `"user"`) and, where the adapter supports it, issues a
144
- provider-level turn interrupt with a replacement instruction. Use it when the
145
- worker should drop its current turn and act on new input immediately, without
146
- losing its session.
147
-
148
- ```bash
149
- echo "Stop refactoring the parser — switch to fixing the failing test in src/foo.ts" \
150
- | trellis channel interrupt impl-task --as dispatcher --to codex-impl --stdin
151
- ```
152
-
153
- Flags:
154
-
155
- - `--as <agent>` **(required)** — caller identity.
156
- - `--to <agent>` **(required)** — target worker.
157
- - `--scope <project|global>` — channel scope.
158
- - `--stdin` / `--text-file <path>` / `[text]` — replacement instruction body.
159
-
160
- The appended event has `kind: "interrupt"` — downstream `wait` / `messages`
161
- filters can subscribe with `--kind interrupt` to react to redirections (e.g.
162
- to log the rerouting, or to gate other workers behind a coordinator's
163
- correction).
164
-
165
- For low-priority hints that should wait for the worker's next turn, send a
166
- plain tagged message instead:
167
-
168
- ```bash
169
- echo "Check this when you reach the next turn." \
170
- | trellis channel send impl-task --as dispatcher --to codex-impl \
171
- --stdin --tag question
172
- ```
173
-
174
- ## Hard Interrupt — `kill` + `--resume`
175
-
176
- Use `kill` when the worker must stop **now** (e.g. runaway loop, bad
177
- instructions already in flight, or `interrupt` is not honored by the
178
- adapter). The supervisor escalates SIGTERM → 8 s grace → SIGKILL; the CLI
179
- writes a `killed` event when SIGKILL is needed so the event log stays
180
- truthful.
181
-
182
- ```bash
183
- trellis channel kill impl-task --as codex-impl
184
- trellis channel spawn impl-task --as codex-impl --provider codex \
185
- --resume "$(cat ~/.trellis/channels/<bucket>/impl-task/worker.session-id)"
186
-
187
- echo "STOP — new instructions: ..." \
188
- | trellis channel send impl-task --as dispatcher --to codex-impl --stdin
189
- ```
190
-
191
- `kill` flags:
192
-
193
- - `--as <agent>` **(required)** — names the worker (positional `<name>` is the channel).
194
- - `--scope <project|global>`.
195
- - `--force` — SIGKILL immediately (also kills the inner worker pid).
196
-
197
- Side effects: cleans `pid`, `worker-pid`, `config`, `spawnlock` sidecar
198
- files; keeps `log`, `session-id`, `thread-id` for forensics and resume.
199
-
200
- When `interrupt` will not converge, kill + `--resume` is the guaranteed
201
- redirection path.
202
-
203
- ## Worker OOM Guard
204
-
205
- The OOM guard prevents orphaned/idle workers from accumulating and exhausting
206
- host resources. It runs at every `spawn` and enforces two policies per
207
- project bucket:
208
-
209
- - **Idle TTL** — sweep workers whose last activity is older than the
210
- configured threshold (default `5m`; `0` disables).
211
- - **Live-worker budget** — refuse the new spawn if more than N workers are
212
- already alive in the same project bucket (default `6`; `0` disables).
213
-
214
- Precedence (highest first):
215
-
216
- 1. CLI flags: `--idle-timeout`, `--max-live-workers` on `spawn`.
217
- 2. Environment variables: `TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT`,
218
- `TRELLIS_CHANNEL_MAX_LIVE_WORKERS`.
219
- 3. For `--agent subnode`, `channel.subnode` in `.trellis/config.yaml`.
220
- 4. `.trellis/config.yaml` under `channel.worker_guard`.
221
- 5. Built-in defaults (`5m`, `6`) for ordinary workers.
222
-
223
- Cleanup notices are written to stderr at spawn time so operators can see which
224
- idle workers were swept and why a new spawn was rejected. The guard does not
225
- touch ephemeral / `channel run` workers any differently — they are subject to
226
- the same idle TTL and budget.
227
-
228
- To audit durable state, use `trellis channel workers <name> --include-terminal
229
- --json`. This is the canonical worker projection. Inspect per-channel `pid` /
230
- `worker-pid` sidecar files under `~/.trellis/channels/<bucket>/<channel>/` only
231
- when diagnosing host-local process liveness; they are not lifecycle truth.
232
-
233
- For bounded evidence workers, `channel.subnode` is a separate role-default
234
- section. It configures `idle_timeout`, `max_live_workers` (generated default
235
- `8`), `timeout`, and `warn_before` only for `spawn --agent subnode`. Explicit
236
- spawn flags remain one-dispatch overrides; ordinary workers retain the generic
237
- `worker_guard` defaults.
238
-
239
- ## Worker Inbox APIs
240
-
241
- The inbox is the channel surface workers wake on. Routing is controlled by
242
- two knobs:
243
-
244
- - **Inbox policy** (`spawn --inbox-policy`):
245
- - `explicitOnly` (default) — worker only wakes on `send --to <worker>` or
246
- `interrupt --to <worker>`.
247
- - `broadcastAndExplicit` — also wakes on broadcasts (`send` with no `--to`).
248
- - **Delivery mode** (`send --delivery-mode`):
249
- - `appendOnly` — append the event regardless of worker state.
250
- - `requireKnownWorker` — fail if no worker named in `--to` was ever spawned.
251
- - `requireRunningWorker` — fail if the named worker is not currently alive.
252
-
253
- Stricter delivery modes prevent silent message loss when callers expect a
254
- running peer.
255
-
256
- Inbox-relevant subcommands:
257
-
258
- - `send <channel> [text]` — append a `message` event.
259
- - `--as <agent>` **(required)** — author.
260
- - `--to <agents>` — CSV; one → string, many → array; broadcast if omitted.
261
- - `--stdin` / `--text-file <path>` / `[text]` — body source.
262
- - `--delivery-mode <appendOnly|requireKnownWorker|requireRunningWorker>`.
263
- - `interrupt <channel> [text]` — soft-interrupt redirect (see above).
264
- - `wait <channel>` — block until matching events arrive.
265
- - `--as <agent>` **(required)** — `self` for filter context.
266
- - `--from <agents>` — CSV authors.
267
- - `--kind <kind[,kind...]>` — CSV (OR semantics); supports `interrupt`,
268
- `done`, `progress`, etc.
269
- - `--to <target>` — defaults to own agent (broadcast + explicit-to-me).
270
- - `--include-progress` — also wake on progress events.
271
- - `--all` — require every `--from` agent to match (timeout → exit **124**).
272
- - `--timeout <duration>` — `30s` / `2m` / `1h` / `1000ms`.
273
- - `messages <channel>` — view / filter / follow the event stream.
274
- - `--follow` to tail, `--kind` / `--from` / `--to` to filter, `--raw` for
275
- JSON-per-line, `--no-progress` to hide progress noise.
276
-
277
- A typical dispatcher loop:
278
-
279
- ```bash
280
- # 1. Wake the worker.
281
- echo "Run the failing test and report." \
282
- | trellis channel send impl-task --as dispatcher --to codex-impl --stdin \
283
- --delivery-mode requireRunningWorker
284
-
285
- # 2. Block until it finishes.
286
- trellis channel wait impl-task --as dispatcher \
287
- --from codex-impl --kind done,error --timeout 30m
288
-
289
- # 3. Read the final answer.
290
- trellis channel messages impl-task --from codex-impl --last 1 --raw
291
- ```
292
-
293
- All event-emitting subcommands (`send`, `interrupt`, `post`, `context add` /
294
- `delete`, `title set` / `clear`, `thread rename`) print the appended event as
295
- a single JSON line on stdout, making the inbox layer easy to script against.
@@ -1,131 +0,0 @@
1
- # Workflows
2
-
3
- Use these patterns by intent. Prefer durable channels for multi-round work and
4
- `channel run` for one-shot questions.
5
-
6
- ## Pattern A: Multi-round Brainstorm
7
-
8
- Use when the user says "和 codex/claude 讨论一下", "brainstorm", or "拉一个 agent
9
- 进来一起看".
10
-
11
- ```bash
12
- trellis channel create brainstorm-storage-layer --by main \
13
- --task .trellis/tasks/05-XX-storage-adapter
14
- BARRIER="$(trellis channel barrier brainstorm-storage-layer)"
15
-
16
- trellis channel spawn brainstorm-storage-layer \
17
- --agent architect --provider codex \
18
- --file .trellis/tasks/05-XX-storage-adapter/prd.md \
19
- --file .trellis/tasks/05-XX-storage-adapter/design.md \
20
- --as cx-arch --timeout 30m
21
-
22
- trellis channel send brainstorm-storage-layer \
23
- --as main --to cx-arch --text-file /tmp/brainstorm-r1.md
24
-
25
- trellis channel wait brainstorm-storage-layer \
26
- --as main --kind done --from cx-arch --after-seq "$BARRIER" --timeout 10m
27
- ```
28
-
29
- Do not stop after one answer. Read the answer, identify vague areas, send a
30
- new probe, and repeat until the result is executable.
31
-
32
- Minimum round structure:
33
-
34
- 1. Direction split: should this live in an existing mechanism or a new one?
35
- 2. MVP boundary: v1, v2, and what would force v2 back into v1.
36
- 3. Data contract: events, schema, metadata, state source of truth, compatibility.
37
- 4. CLI / UX contract: command names, flags, errors, defaults, ambiguity.
38
- 5. Cross-layer risk and tests: shared helpers, drift points, release-blocking tests.
39
-
40
- Optional rounds:
41
-
42
- - Operations: logs, debugging, stuck workers, kill/restart, recovery.
43
- - Migration/release: breaking status, manifest, changelog, docs-site.
44
- - Opposition review: ask the peer agent to argue against the current plan.
45
-
46
- Every probe should request concrete file paths, commands, schema, rejected
47
- alternatives, and release-blocking issues. Reject hedging when a decision is
48
- needed.
49
-
50
- ## Pattern B: Implement / Check Agent
51
-
52
- Use when the user asks to dispatch implementation or review work.
53
-
54
- ```bash
55
- TASK=.trellis/tasks/05-12-foo
56
- trellis channel create cr-foo --task "$TASK" --by main
57
- BARRIER="$(trellis channel barrier cr-foo)"
58
-
59
- trellis channel spawn cr-foo \
60
- --agent check \
61
- --jsonl "$TASK/check.jsonl" \
62
- --file "$TASK/prd.md" \
63
- --file "$TASK/design.md" \
64
- --file "$TASK/implement.md" \
65
- --cwd "$PWD" --timeout 15m
66
-
67
- trellis channel send cr-foo --as main --to check --text-file /tmp/cr-brief.md
68
- trellis channel wait cr-foo --as main --kind done --from check --after-seq "$BARRIER" --timeout 15m
69
- trellis channel messages cr-foo --kind message --from check --tag final_answer
70
- ```
71
-
72
- For implement work, use `--agent implement` and send an implementation brief.
73
- For check work, include the exact diff scope, relevant specs, and validation
74
- already run.
75
-
76
- ## Pattern C: Parallel Reviewers
77
-
78
- Use one channel and distinct worker names.
79
-
80
- ```bash
81
- trellis channel create cr-feature --by main --ephemeral
82
- BARRIER="$(trellis channel barrier cr-feature)"
83
-
84
- trellis channel spawn cr-feature --agent check \
85
- --jsonl "$TASK/check.jsonl" --file "$TASK/prd.md" --file "$TASK/design.md" \
86
- --timeout 15m
87
-
88
- trellis channel spawn cr-feature --agent check --provider codex --as check-cx \
89
- --jsonl "$TASK/check.jsonl" --file "$TASK/prd.md" --file "$TASK/design.md" \
90
- --timeout 15m
91
-
92
- trellis channel send cr-feature --as main --to check --text-file /tmp/cr-brief.md
93
- trellis channel send cr-feature --as main --to check-cx --text-file /tmp/cr-brief.md
94
- trellis channel wait cr-feature --as main --kind done --from check,check-cx --all --after-seq "$BARRIER" --timeout 15m
95
- ```
96
-
97
- `--all` means every listed worker must emit a matching event.
98
-
99
- ## Pattern D: One-shot Worker
100
-
101
- ```bash
102
- trellis channel run --provider codex --message "say hi in 3 words" --timeout 1m
103
- trellis channel run --agent plan --message-file /tmp/plan-question.md --timeout 10m
104
- ```
105
-
106
- On success, `run` removes the ephemeral channel. On error/timeout/killed, it
107
- keeps the channel and prints the path for inspection.
108
-
109
- ## Pattern E: Forum Channel
110
-
111
- Use for issue forums, topic-style feedback, release todos, agent findings, and
112
- internal changelogs. Read `forum.md` for the full model.
113
-
114
- ## Pattern F: Take Over Existing Thread
115
-
116
- If the user gives a forum/thread name, restore context yourself:
117
-
118
- ```bash
119
- trellis channel forum <board> --scope global
120
- trellis channel thread <board> <thread> --scope global --raw
121
- trellis channel context list <board> --scope global --thread <thread>
122
- trellis channel messages <board> --scope global --raw --thread <thread>
123
- ```
124
-
125
- Output a constraint summary, not a transcript dump:
126
-
127
- - user-level problem
128
- - context files that affect this repo
129
- - current-version versus future-version requirements
130
- - whether current code/design satisfies it
131
- - next action or comment to append
@@ -1,70 +0,0 @@
1
- # Local Multi-Agent Channel Runtime
2
-
3
- `trellis channel` is the local multi-agent collaboration runtime shipped with the Trellis CLI. It lets the main AI session spawn peer workers (Claude Code, Codex, or any agent definition under `.trellis/agents/`), exchange durable messages through an event log, and coordinate review or brainstorm loops without hand-stitching shell pipelines.
4
-
5
- This reference covers how channels are wired into the user project so an AI customizing the project knows what to edit. For runtime usage (commands, forum/thread patterns, worker spawn flags), defer to the bundled `trellis-channel` capability skill.
6
-
7
- ## Local System Model
8
-
9
- The channel runtime spans three local surfaces:
10
-
11
- 1. **Storage layer** in the user's home directory: durable event logs and worker state files.
12
- 2. **Agent definitions** inside the project at `.trellis/agents/`: platform-agnostic role cards consumed by `trellis channel spawn --agent <name>`.
13
- 3. **Project configuration** in `.trellis/config.yaml`: worker guard thresholds and other channel knobs.
14
-
15
- ## Core Paths
16
-
17
- | Path | Purpose |
18
- | --- | --- |
19
- | `~/.trellis/channels/<project>/<channel>/events.jsonl` | Per-channel append-only event log. Sequence-locked, replay-safe. |
20
- | `~/.trellis/channels/<project>/<channel>/<channel>.lock` | Channel-level write lock. |
21
- | `~/.trellis/channels/<project>/<channel>/<worker>.spawnlock` | Per-worker spawn lock used by the OOM guard. |
22
- | `~/.trellis/channels/<project>/<channel>/.seq` | Sequence sidecar for ordered event assignment. |
23
- | `~/.trellis/channels/_global/<channel>/...` | Channels created with `--scope global`. The project bucket is replaced by a shared key. |
24
- | `.trellis/agents/check.md` | Default Check Agent role definition consumed by `--agent check`. |
25
- | `.trellis/agents/implement.md` | Default Implement Agent role definition consumed by `--agent implement`. |
26
- | `.trellis/config.yaml` (`channel.*` block) | Worker guard thresholds and channel defaults. |
27
-
28
- The project bucket name is derived from the absolute project path (slashes flattened, non-alphanumerics replaced with `-`), matching Claude Code's `~/.claude/projects/<sanitized-cwd>/` convention. Override with `TRELLIS_CHANNEL_ROOT` (root directory) or `TRELLIS_CHANNEL_PROJECT` (bucket name) for testing or sandboxing.
29
-
30
- ## When To Reach For The Channel Runtime
31
-
32
- Channels are heavier than a single Bash call or a one-shot sub-agent dispatch. Use them only when at least one of these conditions holds:
33
-
34
- - The work needs **two or more agents to converse** through more than one turn (cross-AI brainstorm, peer review, dispatcher + worker).
35
- - A worker should run as a **peer process** that the main session can interrupt, watch progress on, or wait for asynchronously.
36
- - The conversation must be **durable and inspectable** later (forum/thread channels, issue boards, decision trails).
37
- - Multiple workers must **share an event log** so each can see what the others reported.
38
-
39
- Prefer cheaper primitives when:
40
-
41
- - A single-shot Bash command or single Agent tool call is enough -> do that directly.
42
- - The user just needs a static review against a file -> read the file and reply inline.
43
- - The need is "remember what we discussed last week" -> use `trellis mem` instead of a channel.
44
-
45
- ## Customization Points
46
-
47
- | Need | Edit location |
48
- | --- | --- |
49
- | Change default channel worker idle timeout | `channel.worker_guard.idle_timeout` in `.trellis/config.yaml`. Accepts `5m`, `30s`, etc. Set `0` to disable idle cleanup. |
50
- | Change live worker budget | `channel.worker_guard.max_live_workers` in `.trellis/config.yaml`. Set `0` to disable the spawn-time budget check. |
51
- | Override worker guard per spawn | Pass `--idle-timeout` / `--max-live-workers` on `trellis channel spawn`, or set `TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT` / `TRELLIS_CHANNEL_MAX_LIVE_WORKERS` in the environment. |
52
- | Tune bounded subnode dispatch defaults | Set `channel.subnode.max_live_workers`, `idle_timeout`, `timeout`, or `warn_before`. Generated defaults are `8`, `5m`, `30m`, and `5m`; explicit spawn flags and existing guard environment overrides still win. |
53
- | Change what the default Check or Implement worker does | Edit `.trellis/agents/check.md` or `.trellis/agents/implement.md`. These are platform-agnostic role cards; the channel runtime injects them when `--agent check|implement` is passed. |
54
- | Add a new role card | Drop `<name>.md` into `.trellis/agents/`. `trellis channel spawn --agent <name>` will pick it up. |
55
- | Relocate channel storage (CI sandbox, ephemeral runs) | Set `TRELLIS_CHANNEL_ROOT=/path/to/dir`. Channel events move with it; existing channels stay at the old root. |
56
- | Switch storage scope | Pass `--scope project` (default) or `--scope global` on every channel subcommand. The bucket directory changes; nothing else does. |
57
-
58
- Worker guard precedence is: CLI flag > environment variable > `channel.subnode` for `--agent subnode` > `channel.worker_guard` > built-in default. Ordinary worker defaults remain `idle_timeout: 5m` and `max_live_workers: 6`.
59
-
60
- ## Relationship To Other Local Layers
61
-
62
- - **Workflow layer**: workflows that use channel dispatch (such as `channel-driven-subagent-dispatch`) instruct the main agent to call `trellis channel spawn --agent check` or `--agent implement` instead of a platform sub-agent. If `.trellis/agents/check.md` or `implement.md` is missing, `trellis workflow --template <id>` prints a non-blocking warning at install time. Restore them with `trellis update` if they are deleted by accident.
63
- - **Task layer**: channel workers do not own task state. The supervising main session passes the active task path through the worker inbox; the worker resolves task artifacts from disk.
64
- - **Spec layer**: workers read `.trellis/spec/` the same way the main session does. Channel runtime does not bypass spec context loading.
65
- - **Platform integration layer**: channel runtime is platform-neutral. It does not depend on `.claude/`, `.codex/`, or any other platform directory. The adapters that normalize provider output (Claude `stream-json`, Codex `app-server`) live inside the Trellis CLI binary, not in the project.
66
- - **Platform sub-agent files vs. channel workers**: editing `.claude/agents/trellis-implement.md` (and its peers in other platform `.X/agents/` directories) does NOT change channel-runtime worker behavior — channel workers load `.trellis/agents/<name>.md`. The platform-specific agent files are for direct sub-agent dispatch from the main AI session, not for channel-spawned workers. See `platform-files/agents.md` for the per-platform agent surface, and the `trellis-meta/SKILL.md` rule that codifies this split.
67
-
68
- ## Runtime Usage
69
-
70
- For command syntax, forum/thread patterns, worker handles, progress inspection, and the `--kind done` / `--kind turn_finished` dispatcher wait pattern, load the bundled `trellis-channel` skill (auto-installed under each platform's skills directory after `trellis init` / `trellis update`). This reference only covers the local file layout and customization knobs; it does not duplicate command syntax that may change between releases.
@@ -1,14 +0,0 @@
1
- ---
2
- name: trellis-research-record
3
- description: Record task-relevant verified research, audit, or review findings in active Trellis task artifacts. Use when material facts, candidates, uncertainty, or a decision basis should persist; do not use for routine navigation or transient observations.
4
- ---
5
-
6
- # Trellis Research Record
7
-
8
- Keep task-relevant evidence in the active task rather than only in session context.
9
-
10
- 1. Confirm the active task, actual modification target, and authoritative source.
11
- 2. Before changing scope or ending the work, record verified facts with evidence locators in that task's `research/` directory or another appropriate task artifact. Keep candidates and uncertainty separate from facts, and state one bounded next action when needed.
12
- 3. A subnode report is a candidate artifact. The coordinator verifies it and records the resulting conclusion; this Skill does not accept reports, alter task lifecycle, create a handoff, or create a second ledger.
13
-
14
- Do not create a record for routine navigation, temporary tool output, waits, compaction, or observations with no task value.