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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +14 -26
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/ablate.js +1 -1
  6. package/dist/commands/ablate.js.map +1 -1
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +30 -56
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/task-progress.d.ts +2 -0
  11. package/dist/commands/task-progress.d.ts.map +1 -1
  12. package/dist/commands/task-progress.js +37 -30
  13. package/dist/commands/task-progress.js.map +1 -1
  14. package/dist/commands/{channel → teamwork}/adapters/claude.d.ts +3 -3
  15. package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -0
  16. package/dist/commands/{channel → teamwork}/adapters/claude.js +3 -3
  17. package/dist/commands/teamwork/adapters/claude.js.map +1 -0
  18. package/dist/commands/{channel → teamwork}/adapters/codex.d.ts +1 -15
  19. package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -0
  20. package/dist/commands/{channel → teamwork}/adapters/codex.js +5 -42
  21. package/dist/commands/teamwork/adapters/codex.js.map +1 -0
  22. package/dist/commands/{channel → teamwork}/adapters/index.d.ts +6 -6
  23. package/dist/commands/teamwork/adapters/index.d.ts.map +1 -0
  24. package/dist/commands/{channel → teamwork}/adapters/index.js +16 -52
  25. package/dist/commands/teamwork/adapters/index.js.map +1 -0
  26. package/dist/commands/{channel → teamwork}/adapters/types.d.ts +2 -2
  27. package/dist/commands/teamwork/adapters/types.d.ts.map +1 -0
  28. package/dist/commands/teamwork/adapters/types.js.map +1 -0
  29. package/dist/commands/{channel → teamwork}/agent-loader.d.ts +2 -4
  30. package/dist/commands/teamwork/agent-loader.d.ts.map +1 -0
  31. package/dist/commands/{channel → teamwork}/agent-loader.js +4 -35
  32. package/dist/commands/teamwork/agent-loader.js.map +1 -0
  33. package/dist/commands/teamwork/artifact.d.ts +177 -0
  34. package/dist/commands/teamwork/artifact.d.ts.map +1 -0
  35. package/dist/commands/teamwork/artifact.js +908 -0
  36. package/dist/commands/teamwork/artifact.js.map +1 -0
  37. package/dist/commands/{channel → teamwork}/context-loader.d.ts +1 -1
  38. package/dist/commands/teamwork/context-loader.d.ts.map +1 -0
  39. package/dist/commands/{channel → teamwork}/context-loader.js +12 -12
  40. package/dist/commands/teamwork/context-loader.js.map +1 -0
  41. package/dist/commands/{channel → teamwork}/context-trust.d.ts +6 -6
  42. package/dist/commands/teamwork/context-trust.d.ts.map +1 -0
  43. package/dist/commands/{channel → teamwork}/context-trust.js +16 -16
  44. package/dist/commands/teamwork/context-trust.js.map +1 -0
  45. package/dist/commands/teamwork/context.d.ts +16 -0
  46. package/dist/commands/teamwork/context.d.ts.map +1 -0
  47. package/dist/commands/{channel → teamwork}/context.js +17 -17
  48. package/dist/commands/teamwork/context.js.map +1 -0
  49. package/dist/commands/teamwork/coordinator.d.ts +89 -0
  50. package/dist/commands/teamwork/coordinator.d.ts.map +1 -0
  51. package/dist/commands/teamwork/coordinator.js +1198 -0
  52. package/dist/commands/teamwork/coordinator.js.map +1 -0
  53. package/dist/commands/teamwork/create.d.ts +23 -0
  54. package/dist/commands/teamwork/create.d.ts.map +1 -0
  55. package/dist/commands/teamwork/create.js +39 -0
  56. package/dist/commands/teamwork/create.js.map +1 -0
  57. package/dist/commands/{channel → teamwork}/dev-parse-trace.d.ts +1 -1
  58. package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -0
  59. package/dist/commands/{channel → teamwork}/dev-parse-trace.js +1 -1
  60. package/dist/commands/teamwork/dev-parse-trace.js.map +1 -0
  61. package/dist/commands/{channel → teamwork}/guard.d.ts +27 -46
  62. package/dist/commands/teamwork/guard.d.ts.map +1 -0
  63. package/dist/commands/{channel → teamwork}/guard.js +54 -156
  64. package/dist/commands/teamwork/guard.js.map +1 -0
  65. package/dist/commands/teamwork/index.d.ts +3 -0
  66. package/dist/commands/teamwork/index.d.ts.map +1 -0
  67. package/dist/commands/{channel → teamwork}/index.js +135 -165
  68. package/dist/commands/teamwork/index.js.map +1 -0
  69. package/dist/commands/{channel → teamwork}/interrupt.d.ts +1 -1
  70. package/dist/commands/teamwork/interrupt.d.ts.map +1 -0
  71. package/dist/commands/teamwork/interrupt.js +22 -0
  72. package/dist/commands/teamwork/interrupt.js.map +1 -0
  73. package/dist/commands/teamwork/kill.d.ts +7 -0
  74. package/dist/commands/teamwork/kill.d.ts.map +1 -0
  75. package/dist/commands/{channel → teamwork}/kill.js +21 -21
  76. package/dist/commands/teamwork/kill.js.map +1 -0
  77. package/dist/commands/teamwork/list.d.ts +17 -0
  78. package/dist/commands/teamwork/list.d.ts.map +1 -0
  79. package/dist/commands/{channel → teamwork}/list.js +18 -27
  80. package/dist/commands/teamwork/list.js.map +1 -0
  81. package/dist/commands/{channel → teamwork}/messages.d.ts +1 -1
  82. package/dist/commands/teamwork/messages.d.ts.map +1 -0
  83. package/dist/commands/{channel → teamwork}/messages.js +18 -18
  84. package/dist/commands/teamwork/messages.js.map +1 -0
  85. package/dist/commands/teamwork/profiles.d.ts +25 -0
  86. package/dist/commands/teamwork/profiles.d.ts.map +1 -0
  87. package/dist/commands/teamwork/profiles.js +125 -0
  88. package/dist/commands/teamwork/profiles.js.map +1 -0
  89. package/dist/commands/teamwork/rm.d.ts +27 -0
  90. package/dist/commands/teamwork/rm.d.ts.map +1 -0
  91. package/dist/commands/{channel → teamwork}/rm.js +21 -22
  92. package/dist/commands/teamwork/rm.js.map +1 -0
  93. package/dist/commands/teamwork/run.d.ts +29 -0
  94. package/dist/commands/{channel → teamwork}/run.d.ts.map +1 -1
  95. package/dist/commands/teamwork/run.js +129 -0
  96. package/dist/commands/teamwork/run.js.map +1 -0
  97. package/dist/commands/{channel → teamwork}/send.d.ts +1 -1
  98. package/dist/commands/teamwork/send.d.ts.map +1 -0
  99. package/dist/commands/{channel → teamwork}/send.js +7 -7
  100. package/dist/commands/teamwork/send.js.map +1 -0
  101. package/dist/commands/{channel → teamwork}/spawn.d.ts +8 -12
  102. package/dist/commands/teamwork/spawn.d.ts.map +1 -0
  103. package/dist/commands/{channel → teamwork}/spawn.js +51 -112
  104. package/dist/commands/teamwork/spawn.js.map +1 -0
  105. package/dist/commands/teamwork/store/events.d.ts +22 -0
  106. package/dist/commands/teamwork/store/events.d.ts.map +1 -0
  107. package/dist/commands/{channel → teamwork}/store/events.js +8 -8
  108. package/dist/commands/teamwork/store/events.js.map +1 -0
  109. package/dist/commands/teamwork/store/filter.d.ts +3 -0
  110. package/dist/commands/teamwork/store/filter.d.ts.map +1 -0
  111. package/dist/commands/teamwork/store/filter.js +2 -0
  112. package/dist/commands/teamwork/store/filter.js.map +1 -0
  113. package/dist/commands/{channel → teamwork}/store/lock.d.ts +1 -1
  114. package/dist/commands/teamwork/store/lock.d.ts.map +1 -0
  115. package/dist/commands/{channel → teamwork}/store/lock.js +2 -2
  116. package/dist/commands/teamwork/store/lock.js.map +1 -0
  117. package/dist/commands/{channel → teamwork}/store/paths.d.ts +18 -32
  118. package/dist/commands/teamwork/store/paths.d.ts.map +1 -0
  119. package/dist/commands/{channel → teamwork}/store/paths.js +42 -109
  120. package/dist/commands/teamwork/store/paths.js.map +1 -0
  121. package/dist/commands/teamwork/store/schema.d.ts +18 -0
  122. package/dist/commands/teamwork/store/schema.d.ts.map +1 -0
  123. package/dist/commands/teamwork/store/schema.js +23 -0
  124. package/dist/commands/teamwork/store/schema.js.map +1 -0
  125. package/dist/commands/{channel → teamwork}/store/thread-state.d.ts +3 -3
  126. package/dist/commands/teamwork/store/thread-state.d.ts.map +1 -0
  127. package/dist/commands/{channel → teamwork}/store/thread-state.js +1 -1
  128. package/dist/commands/teamwork/store/thread-state.js.map +1 -0
  129. package/dist/commands/teamwork/store/watch.d.ts +19 -0
  130. package/dist/commands/teamwork/store/watch.d.ts.map +1 -0
  131. package/dist/commands/{channel → teamwork}/store/watch.js +8 -8
  132. package/dist/commands/teamwork/store/watch.js.map +1 -0
  133. package/dist/commands/teamwork/supervisor/idle.d.ts.map +1 -0
  134. package/dist/commands/teamwork/supervisor/idle.js.map +1 -0
  135. package/dist/commands/{channel → teamwork}/supervisor/inbox.d.ts +2 -2
  136. package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -0
  137. package/dist/commands/{channel → teamwork}/supervisor/inbox.js +14 -14
  138. package/dist/commands/teamwork/supervisor/inbox.js.map +1 -0
  139. package/dist/commands/{channel → teamwork}/supervisor/shutdown.d.ts +3 -6
  140. package/dist/commands/teamwork/supervisor/shutdown.d.ts.map +1 -0
  141. package/dist/commands/{channel → teamwork}/supervisor/shutdown.js +7 -17
  142. package/dist/commands/teamwork/supervisor/shutdown.js.map +1 -0
  143. package/dist/commands/{channel → teamwork}/supervisor/stdout.d.ts +3 -5
  144. package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -0
  145. package/dist/commands/{channel → teamwork}/supervisor/stdout.js +12 -23
  146. package/dist/commands/teamwork/supervisor/stdout.js.map +1 -0
  147. package/dist/commands/teamwork/supervisor/turns.d.ts.map +1 -0
  148. package/dist/commands/teamwork/supervisor/turns.js.map +1 -0
  149. package/dist/commands/{channel → teamwork}/supervisor/warning.d.ts +5 -5
  150. package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -0
  151. package/dist/commands/{channel → teamwork}/supervisor/warning.js +6 -6
  152. package/dist/commands/teamwork/supervisor/warning.js.map +1 -0
  153. package/dist/commands/{channel → teamwork}/supervisor.d.ts +21 -21
  154. package/dist/commands/teamwork/supervisor.d.ts.map +1 -0
  155. package/dist/commands/{channel → teamwork}/supervisor.js +53 -63
  156. package/dist/commands/teamwork/supervisor.js.map +1 -0
  157. package/dist/commands/teamwork/teammate-adapters.d.ts +31 -0
  158. package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -0
  159. package/dist/commands/teamwork/teammate-adapters.js +96 -0
  160. package/dist/commands/teamwork/teammate-adapters.js.map +1 -0
  161. package/dist/commands/teamwork/teammate-config.d.ts +19 -0
  162. package/dist/commands/teamwork/teammate-config.d.ts.map +1 -0
  163. package/dist/commands/teamwork/teammate-config.js +97 -0
  164. package/dist/commands/teamwork/teammate-config.js.map +1 -0
  165. package/dist/commands/teamwork/teammate-launch.d.ts +58 -0
  166. package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -0
  167. package/dist/commands/teamwork/teammate-launch.js +125 -0
  168. package/dist/commands/teamwork/teammate-launch.js.map +1 -0
  169. package/dist/commands/teamwork/text-body.d.ts +13 -0
  170. package/dist/commands/teamwork/text-body.d.ts.map +1 -0
  171. package/dist/commands/{channel → teamwork}/text-body.js +3 -3
  172. package/dist/commands/teamwork/text-body.js.map +1 -0
  173. package/dist/commands/teamwork/threads.d.ts +35 -0
  174. package/dist/commands/teamwork/threads.d.ts.map +1 -0
  175. package/dist/commands/{channel → teamwork}/threads.js +19 -19
  176. package/dist/commands/teamwork/threads.js.map +1 -0
  177. package/dist/commands/teamwork/title.d.ts +12 -0
  178. package/dist/commands/teamwork/title.d.ts.map +1 -0
  179. package/dist/commands/teamwork/title.js +24 -0
  180. package/dist/commands/teamwork/title.js.map +1 -0
  181. package/dist/commands/{channel → teamwork}/wait.d.ts +1 -5
  182. package/dist/commands/teamwork/wait.d.ts.map +1 -0
  183. package/dist/commands/{channel → teamwork}/wait.js +8 -21
  184. package/dist/commands/teamwork/wait.js.map +1 -0
  185. package/dist/commands/update.d.ts.map +1 -1
  186. package/dist/commands/update.js +93 -90
  187. package/dist/commands/update.js.map +1 -1
  188. package/dist/commands/workflow.d.ts +1 -1
  189. package/dist/commands/workflow.d.ts.map +1 -1
  190. package/dist/commands/workflow.js +9 -10
  191. package/dist/commands/workflow.js.map +1 -1
  192. package/dist/configurators/claude.d.ts +0 -17
  193. package/dist/configurators/claude.d.ts.map +1 -1
  194. package/dist/configurators/claude.js +2 -61
  195. package/dist/configurators/claude.js.map +1 -1
  196. package/dist/configurators/shared.d.ts.map +1 -1
  197. package/dist/configurators/shared.js +2 -2
  198. package/dist/configurators/shared.js.map +1 -1
  199. package/dist/configurators/snow.js +1 -1
  200. package/dist/configurators/snow.js.map +1 -1
  201. package/dist/configurators/workflow.d.ts +1 -1
  202. package/dist/configurators/workflow.js +5 -5
  203. package/dist/configurators/workflow.js.map +1 -1
  204. package/dist/constants/paths.d.ts +1 -1
  205. package/dist/constants/paths.d.ts.map +1 -1
  206. package/dist/constants/paths.js +1 -1
  207. package/dist/constants/paths.js.map +1 -1
  208. package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
  209. package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
  210. package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
  211. package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
  212. package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
  213. package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
  214. package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
  215. package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
  216. package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
  217. package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
  218. package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
  219. package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
  220. package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
  221. package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
  222. package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
  223. package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
  224. package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
  225. package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
  226. package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
  227. package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
  228. package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
  229. package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
  230. package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
  231. package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
  232. package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
  233. package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
  234. package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
  235. package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
  236. package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
  237. package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
  238. package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
  239. package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
  240. package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
  241. package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
  242. package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
  243. package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
  244. package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
  245. package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
  246. package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
  247. package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
  248. package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
  249. package/dist/migrations/manifests/0.7.0-beta.51.json +9 -0
  250. package/dist/migrations/manifests/0.7.0-beta.52.json +9 -0
  251. package/dist/migrations/manifests/0.7.0-beta.53.json +27 -0
  252. package/dist/migrations/manifests/0.7.0-beta.54.json +8 -0
  253. package/dist/migrations/manifests/0.7.1-beta.0.json +9 -0
  254. package/dist/migrations/manifests/0.7.1-beta.1.json +186 -0
  255. package/dist/migrations/manifests/0.7.1.json +9 -0
  256. package/dist/templates/claude/hooks/statusline.py +0 -7
  257. package/dist/templates/codex/hooks/session-start.py +31 -38
  258. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
  259. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
  260. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
  261. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
  262. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
  263. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
  264. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
  265. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
  266. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
  267. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  268. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
  269. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
  270. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  271. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
  272. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
  273. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
  274. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  275. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
  276. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
  277. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
  278. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  279. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
  280. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
  281. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
  282. package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
  283. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
  284. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
  285. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
  286. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
  287. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
  288. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
  289. package/dist/templates/common/commands/continue.md +9 -49
  290. package/dist/templates/common/commands/finish-work.md +10 -58
  291. package/dist/templates/common/commands/start.md +19 -49
  292. package/dist/templates/common/skills/brainstorm.md +11 -199
  293. package/dist/templates/copilot/hooks/session-start.py +30 -26
  294. package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -160
  295. package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
  296. package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
  297. package/dist/templates/copilot/prompts/start.prompt.md +12 -10
  298. package/dist/templates/dsh/DSH.md +2 -2
  299. package/dist/templates/extract.js +4 -0
  300. package/dist/templates/extract.js.map +1 -1
  301. package/dist/templates/kiro/agents/trellis.json +2 -2
  302. package/dist/templates/markdown/agents.md +14 -3
  303. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
  304. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
  305. package/dist/templates/markdown/workspace-index.md +0 -1
  306. package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
  307. package/dist/templates/opencode/lib/session-utils.js +20 -25
  308. package/dist/templates/opencode/lib/trellis-context.js +4 -76
  309. package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
  310. package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
  311. package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
  312. package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
  313. package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
  314. package/dist/templates/shared-hooks/session-start.py +21 -33
  315. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
  316. package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
  317. package/dist/templates/trellis/agents/teammate.md +63 -0
  318. package/dist/templates/trellis/config.yaml +29 -38
  319. package/dist/templates/trellis/gitignore.txt +1 -0
  320. package/dist/templates/trellis/index.d.ts +8 -12
  321. package/dist/templates/trellis/index.d.ts.map +1 -1
  322. package/dist/templates/trellis/index.js +14 -25
  323. package/dist/templates/trellis/index.js.map +1 -1
  324. package/dist/templates/trellis/scripts/add_session.py +1 -1
  325. package/dist/templates/trellis/scripts/common/__init__.py +0 -1
  326. package/dist/templates/trellis/scripts/common/active_task.py +136 -100
  327. package/dist/templates/trellis/scripts/common/config.py +7 -9
  328. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  329. package/dist/templates/trellis/scripts/common/io.py +19 -0
  330. package/dist/templates/trellis/scripts/common/paths.py +0 -1
  331. package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
  332. package/dist/templates/trellis/scripts/common/session_context.py +1 -8
  333. package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
  334. package/dist/templates/trellis/scripts/common/task_context.py +152 -59
  335. package/dist/templates/trellis/scripts/common/task_continuity.py +598 -0
  336. package/dist/templates/trellis/scripts/common/task_store.py +70 -548
  337. package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
  338. package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
  339. package/dist/templates/trellis/scripts/common/tasks.py +5 -8
  340. package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
  341. package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
  342. package/dist/templates/trellis/scripts/task.py +119 -377
  343. package/dist/templates/trellis/workflow.md +111 -706
  344. package/dist/utils/agent-refs.d.ts +5 -5
  345. package/dist/utils/agent-refs.js +6 -6
  346. package/dist/utils/file-writer.d.ts +3 -2
  347. package/dist/utils/file-writer.d.ts.map +1 -1
  348. package/dist/utils/file-writer.js +3 -2
  349. package/dist/utils/file-writer.js.map +1 -1
  350. package/dist/utils/managed-paths.d.ts +0 -7
  351. package/dist/utils/managed-paths.d.ts.map +1 -1
  352. package/dist/utils/managed-paths.js +0 -40
  353. package/dist/utils/managed-paths.js.map +1 -1
  354. package/dist/utils/manifest-prune.d.ts +2 -1
  355. package/dist/utils/manifest-prune.d.ts.map +1 -1
  356. package/dist/utils/manifest-prune.js +14 -16
  357. package/dist/utils/manifest-prune.js.map +1 -1
  358. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  359. package/dist/utils/uninstall-scrubbers.js +3 -3
  360. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  361. package/dist/utils/workflow-resolver.d.ts +10 -16
  362. package/dist/utils/workflow-resolver.d.ts.map +1 -1
  363. package/dist/utils/workflow-resolver.js +25 -36
  364. package/dist/utils/workflow-resolver.js.map +1 -1
  365. package/package.json +2 -2
  366. package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
  367. package/dist/commands/channel/adapters/claude.js.map +0 -1
  368. package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
  369. package/dist/commands/channel/adapters/codex.js.map +0 -1
  370. package/dist/commands/channel/adapters/index.d.ts.map +0 -1
  371. package/dist/commands/channel/adapters/index.js.map +0 -1
  372. package/dist/commands/channel/adapters/types.d.ts.map +0 -1
  373. package/dist/commands/channel/adapters/types.js.map +0 -1
  374. package/dist/commands/channel/agent-loader.d.ts.map +0 -1
  375. package/dist/commands/channel/agent-loader.js.map +0 -1
  376. package/dist/commands/channel/context-loader.d.ts.map +0 -1
  377. package/dist/commands/channel/context-loader.js.map +0 -1
  378. package/dist/commands/channel/context-trust.d.ts.map +0 -1
  379. package/dist/commands/channel/context-trust.js.map +0 -1
  380. package/dist/commands/channel/context.d.ts +0 -16
  381. package/dist/commands/channel/context.d.ts.map +0 -1
  382. package/dist/commands/channel/context.js.map +0 -1
  383. package/dist/commands/channel/create.d.ts +0 -29
  384. package/dist/commands/channel/create.d.ts.map +0 -1
  385. package/dist/commands/channel/create.js +0 -47
  386. package/dist/commands/channel/create.js.map +0 -1
  387. package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
  388. package/dist/commands/channel/dev-parse-trace.js.map +0 -1
  389. package/dist/commands/channel/guard.d.ts.map +0 -1
  390. package/dist/commands/channel/guard.js.map +0 -1
  391. package/dist/commands/channel/index.d.ts +0 -3
  392. package/dist/commands/channel/index.d.ts.map +0 -1
  393. package/dist/commands/channel/index.js.map +0 -1
  394. package/dist/commands/channel/interrupt.d.ts.map +0 -1
  395. package/dist/commands/channel/interrupt.js +0 -22
  396. package/dist/commands/channel/interrupt.js.map +0 -1
  397. package/dist/commands/channel/kill.d.ts +0 -7
  398. package/dist/commands/channel/kill.d.ts.map +0 -1
  399. package/dist/commands/channel/kill.js.map +0 -1
  400. package/dist/commands/channel/list.d.ts +0 -18
  401. package/dist/commands/channel/list.d.ts.map +0 -1
  402. package/dist/commands/channel/list.js.map +0 -1
  403. package/dist/commands/channel/messages.d.ts.map +0 -1
  404. package/dist/commands/channel/messages.js.map +0 -1
  405. package/dist/commands/channel/rm.d.ts +0 -27
  406. package/dist/commands/channel/rm.d.ts.map +0 -1
  407. package/dist/commands/channel/rm.js.map +0 -1
  408. package/dist/commands/channel/run.d.ts +0 -32
  409. package/dist/commands/channel/run.js +0 -141
  410. package/dist/commands/channel/run.js.map +0 -1
  411. package/dist/commands/channel/send.d.ts.map +0 -1
  412. package/dist/commands/channel/send.js.map +0 -1
  413. package/dist/commands/channel/spawn.d.ts.map +0 -1
  414. package/dist/commands/channel/spawn.js.map +0 -1
  415. package/dist/commands/channel/store/events.d.ts +0 -22
  416. package/dist/commands/channel/store/events.d.ts.map +0 -1
  417. package/dist/commands/channel/store/events.js.map +0 -1
  418. package/dist/commands/channel/store/filter.d.ts +0 -3
  419. package/dist/commands/channel/store/filter.d.ts.map +0 -1
  420. package/dist/commands/channel/store/filter.js +0 -2
  421. package/dist/commands/channel/store/filter.js.map +0 -1
  422. package/dist/commands/channel/store/lock.d.ts.map +0 -1
  423. package/dist/commands/channel/store/lock.js.map +0 -1
  424. package/dist/commands/channel/store/paths.d.ts.map +0 -1
  425. package/dist/commands/channel/store/paths.js.map +0 -1
  426. package/dist/commands/channel/store/schema.d.ts +0 -27
  427. package/dist/commands/channel/store/schema.d.ts.map +0 -1
  428. package/dist/commands/channel/store/schema.js +0 -34
  429. package/dist/commands/channel/store/schema.js.map +0 -1
  430. package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
  431. package/dist/commands/channel/store/thread-state.js.map +0 -1
  432. package/dist/commands/channel/store/watch.d.ts +0 -19
  433. package/dist/commands/channel/store/watch.d.ts.map +0 -1
  434. package/dist/commands/channel/store/watch.js.map +0 -1
  435. package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
  436. package/dist/commands/channel/supervisor/idle.js.map +0 -1
  437. package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
  438. package/dist/commands/channel/supervisor/inbox.js.map +0 -1
  439. package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
  440. package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
  441. package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
  442. package/dist/commands/channel/supervisor/stdout.js.map +0 -1
  443. package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
  444. package/dist/commands/channel/supervisor/turns.js.map +0 -1
  445. package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
  446. package/dist/commands/channel/supervisor/warning.js.map +0 -1
  447. package/dist/commands/channel/supervisor.d.ts.map +0 -1
  448. package/dist/commands/channel/supervisor.js.map +0 -1
  449. package/dist/commands/channel/text-body.d.ts +0 -13
  450. package/dist/commands/channel/text-body.d.ts.map +0 -1
  451. package/dist/commands/channel/text-body.js.map +0 -1
  452. package/dist/commands/channel/threads.d.ts +0 -39
  453. package/dist/commands/channel/threads.d.ts.map +0 -1
  454. package/dist/commands/channel/threads.js.map +0 -1
  455. package/dist/commands/channel/title.d.ts +0 -12
  456. package/dist/commands/channel/title.d.ts.map +0 -1
  457. package/dist/commands/channel/title.js +0 -24
  458. package/dist/commands/channel/title.js.map +0 -1
  459. package/dist/commands/channel/wait.d.ts.map +0 -1
  460. package/dist/commands/channel/wait.js.map +0 -1
  461. package/dist/commands/channel/workers.d.ts +0 -9
  462. package/dist/commands/channel/workers.d.ts.map +0 -1
  463. package/dist/commands/channel/workers.js +0 -31
  464. package/dist/commands/channel/workers.js.map +0 -1
  465. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
  466. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
  467. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
  468. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
  469. package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -222
  470. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
  471. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
  472. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
  473. package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
  474. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  475. package/dist/templates/trellis/agents/check.md +0 -70
  476. package/dist/templates/trellis/agents/implement.md +0 -71
  477. package/dist/templates/trellis/agents/subnode.env +0 -4
  478. package/dist/templates/trellis/agents/subnode.md +0 -76
  479. package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
  480. package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
  481. package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
  482. package/dist/templates/trellis/scripts/subnode_artifact.py +0 -735
  483. package/dist/templates/trellis/scripts/workspace_note.py +0 -126
  484. /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
  485. /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
  486. /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
  487. /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
  488. /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
@@ -1,233 +0,0 @@
1
- # Forum Channels
2
-
3
- Forum channels are durable, topic-style channels. They are created with
4
- `--type forum` at channel-creation time and are immutable after that. They are
5
- not normal chat streams: the default read path is
6
- **forum summary -> one thread timeline -> current context**.
7
-
8
- ## Forum vs Regular Channel
9
-
10
- A channel's type is set with `--type` on `channel create` and never changes:
11
-
12
- - `chat` (default) — flat message timeline. `channel messages` always renders
13
- the event stream. Forum-only flags such as `--thread` and `--action` are
14
- rejected here.
15
- - `forum` — thread-oriented. `channel messages` without filters renders a
16
- thread-board summary instead of raw events. The `post`, `forum`, `thread`,
17
- and `thread rename` subcommands only apply to forum channels.
18
-
19
- Both types share the same scope model (`--scope project` is the default;
20
- `--scope global` puts the channel in the cross-project bucket).
21
-
22
- ## Create A Forum Channel
23
-
24
- ```bash
25
- trellis channel create design-feedback \
26
- --type forum \
27
- --scope global \
28
- --description "Cross-project design feedback board." \
29
- --context-raw "One thread per design topic; close when resolved." \
30
- --by main
31
- ```
32
-
33
- Use `--scope project` for a board scoped to one repo, `--scope global` for a
34
- cross-project board.
35
-
36
- ## Threads: Open, Comment, Status, Summary
37
-
38
- Threads live inside a forum channel. Each thread is identified by a stable
39
- `--thread <key>` (lowercase kebab-case is conventional). The first action on
40
- a thread is `opened`; everything afterwards uses the same `--thread` key.
41
-
42
- ```bash
43
- trellis channel post design-feedback opened \
44
- --scope global \
45
- --as main \
46
- --thread login-empty-state \
47
- --title "Empty state on the login screen" \
48
- --description "Track design feedback for the new login empty state." \
49
- --labels design,login \
50
- --context-raw "Spotted during the 0.4 release review." \
51
- --text-file /tmp/thread-open.md
52
-
53
- trellis channel post design-feedback comment \
54
- --scope global \
55
- --as reviewer \
56
- --thread login-empty-state \
57
- --text-file /tmp/review.md
58
-
59
- trellis channel post design-feedback status \
60
- --scope global \
61
- --as main \
62
- --thread login-empty-state \
63
- --status closed
64
-
65
- trellis channel post design-feedback summary \
66
- --scope global \
67
- --as main \
68
- --thread login-empty-state \
69
- --summary "Adopted the option-B layout; ticket TRELLIS-123 owns the fix."
70
- ```
71
-
72
- Key distinctions:
73
-
74
- - `--description` is the **durable** thread description (the answer to "what
75
- is this thread about?"). It is set on `opened` and edited by re-running
76
- `post` with `--description`.
77
- - `--text` / `--stdin` / `--text-file` is the **event body** — the comment or
78
- payload attached to this specific timeline entry.
79
- - `--labels` and `--assignees` are CSV and **replace** the current value; they
80
- do not append.
81
- - `--summary` is the rolling thread summary. Setting it on `status closed` is
82
- the standard way to mark a thread resolved with context.
83
-
84
- `--thread` is required for every action except `opened` (where it is also
85
- required in practice — there is no anonymous thread).
86
-
87
- ## Read A Forum
88
-
89
- ```bash
90
- trellis channel messages design-feedback --scope global
91
- trellis channel forum design-feedback --scope global --status open
92
- trellis channel thread design-feedback login-empty-state --scope global
93
- trellis channel messages design-feedback --scope global --raw --thread login-empty-state
94
- ```
95
-
96
- If a peer says "I commented on the forum", run `channel forum` first to see
97
- which thread changed, then drill into that thread with `channel thread <name>
98
- <thread>`. Do not jump straight to ad-hoc `events.jsonl` parsing.
99
-
100
- ## Context
101
-
102
- Context entries are durable background that should always be in scope when
103
- reading a channel or a thread. They are **not** timeline events; they are
104
- projected separately and replayed for every reader.
105
-
106
- Use the `context` subcommands. The legacy `--linked-context-file` /
107
- `--linked-context-raw` flags on `create` and `post` are deprecated aliases
108
- that fold into the canonical `--context-file` / `--context-raw`.
109
-
110
- ### Add Context
111
-
112
- ```bash
113
- # Channel-level context (whole forum)
114
- trellis channel context add design-feedback \
115
- --scope global \
116
- --raw "Upstream feedback board; please link tasks before opening threads."
117
-
118
- # Thread-level context (one thread)
119
- trellis channel context add design-feedback \
120
- --scope global \
121
- --thread login-empty-state \
122
- --file "$PWD/.trellis/tasks/05-13-login-redesign/design.md"
123
- ```
124
-
125
- - `--thread <key>` switches between channel-level and thread-level context.
126
- - `--file` paths **must be absolute**; relative paths are rejected.
127
- - `--raw` is plain text inline content.
128
- - Both flags are repeatable; at least one is required for `add` / `delete`.
129
- - `--as <agent>` records authorship; defaults to `main`.
130
-
131
- ### List Context
132
-
133
- ```bash
134
- trellis channel context list design-feedback --scope global
135
- trellis channel context list design-feedback --scope global --thread login-empty-state --raw
136
- ```
137
-
138
- `--raw` on `list` emits one JSON entry per line (useful for piping); without
139
- it you get a human-readable `file <path>` / `raw <truncated text>` listing.
140
- An empty store prints `(no context)`.
141
-
142
- ### Delete Context
143
-
144
- ```bash
145
- trellis channel context delete design-feedback \
146
- --scope global \
147
- --thread login-empty-state \
148
- --raw "stale note"
149
- ```
150
-
151
- You delete by **value**, not by id: pass the same `--file` or `--raw` value
152
- that was added. Repeat the flag to delete multiple entries in one call.
153
-
154
- ### Reading Order
155
-
156
- When reading a thread, work top-down:
157
-
158
- 1. Thread `description` (the durable "what is this about").
159
- 2. Context entries (channel-level + thread-level).
160
- 3. Timeline (`opened`, `comment`, `status`, `summary`).
161
-
162
- If a context file is missing or unreadable, state that explicitly and
163
- continue with the remaining data — do not fabricate the content.
164
-
165
- ## Title Projection
166
-
167
- `title` projects a stable display title onto the channel without renaming the
168
- storage address. The channel `name` you pass to every command stays the same.
169
-
170
- ```bash
171
- trellis channel title set design-feedback \
172
- --scope global \
173
- --title "Design feedback board"
174
-
175
- trellis channel title clear design-feedback --scope global
176
- ```
177
-
178
- - `title set` requires `--title`.
179
- - `--as <agent>` records authorship; defaults to `main`.
180
- - This is a presentation-layer change. Tooling and scripts keep using the
181
- original channel name.
182
-
183
- ## Thread Rename
184
-
185
- `thread rename` is the correction path when a thread was opened with the
186
- wrong key (typo, wrong slug convention, etc.). Threads do not support hard
187
- deletion — rename is the supported corrective action.
188
-
189
- ```bash
190
- trellis channel thread rename design-feedback old-key new-key \
191
- --scope global \
192
- --as main
193
- ```
194
-
195
- - `--as <agent>` is **required**.
196
- - `post <name> rename` is rejected — you must use `thread rename`.
197
-
198
- ## Deletion Discipline
199
-
200
- Do not model single-comment deletion or hard thread deletion as normal
201
- workflow. Forum threads are append-only collaboration history. To correct
202
- state, use:
203
-
204
- - `post ... status` to mark a thread closed / blocked / etc.
205
- - `post ... summary` to record the resolution.
206
- - `post ... --labels` to re-label (replaces the set).
207
- - `thread rename` to correct a bad thread key.
208
-
209
- ## Internal Changelog Pattern
210
-
211
- A common use of a global forum channel is an internal release / runtime
212
- changelog. One thread per notable change keeps history searchable:
213
-
214
- ```bash
215
- trellis channel create release-notes \
216
- --type forum \
217
- --scope global \
218
- --description "Internal release and runtime changelog." \
219
- --context-raw "One thread per notable change; close when shipped." \
220
- --by main
221
-
222
- trellis channel post release-notes opened \
223
- --scope global \
224
- --as main \
225
- --thread release-2026-q1 \
226
- --title "Channel threads and forum UX in 0.6" \
227
- --description "Forum channel UX shipped in the 0.6 line." \
228
- --labels channel,release \
229
- --text-file /tmp/release-notes.md
230
- ```
231
-
232
- Use stable, descriptive thread keys (e.g. `release-2026-q1`,
233
- `runtime-event-schema-change`) so later readers can find them by name.
@@ -1,237 +0,0 @@
1
- # Progress And Debugging
2
-
3
- Pretty output is for operators. Raw output is the audit log. Subcommands
4
- (`forum`, `thread`, `messages`, `context`) are the audit _interface_ — reach
5
- for them before grepping `events.jsonl` by hand.
6
-
7
- ## Pretty vs `--raw`
8
-
9
- `trellis channel messages <channel>` renders a compact, human-readable view:
10
- timestamps, identities, kind, and a short body. It is meant for operators
11
- scanning a channel, not for diagnostics.
12
-
13
- Pretty output can and will truncate:
14
-
15
- - long progress deltas (`text_delta`, partial tool args)
16
- - tool names and command lines
17
- - multi-line status fields and structured `detail` blobs
18
- - forum thread titles past the column budget
19
-
20
- When something looks "off" — a worker appears stuck, a progress line ends
21
- mid-word, an action field shows `...` — switch to `--raw`. Raw mode emits
22
- one JSON event per line exactly as it lives in `events.jsonl`, so nothing
23
- is dropped.
24
-
25
- ```bash
26
- # Pretty (operator view)
27
- trellis channel messages <channel> --kind done --last 10
28
- trellis channel messages <channel> --kind error --last 10
29
-
30
- # Raw (diagnostic view) — one JSON per line
31
- trellis channel messages <channel> --raw --kind progress --last 20
32
- trellis channel messages <channel> --raw --last 50
33
- ```
34
-
35
- Rule of thumb: never diagnose a worker from a truncated progress line.
36
-
37
- ### Rebuild Streaming Text
38
-
39
- To reconstruct what a model actually streamed during a turn, concatenate
40
- `detail.text_delta` from progress events:
41
-
42
- ```bash
43
- trellis channel messages <channel> --raw --kind progress --last 80 \
44
- | python3 -c 'import json,sys; [print((json.loads(l).get("detail") or {}).get("text_delta",""), end="") for l in sys.stdin if l.strip()]'
45
- ```
46
-
47
- ## Stalled Worker Diagnosis
48
-
49
- Symptom: `trellis channel list` shows the worker as running, but no new
50
- events appear in `messages` and `wait` keeps timing out.
51
-
52
- Triage order:
53
-
54
- 1. **Locate the channel files.** Use `list --all --all-projects` if you are
55
- not sure which bucket the channel lives in.
56
-
57
- ```bash
58
- trellis channel list --all --all-projects
59
- CHAN=~/.trellis/channels/<bucket>/<channel>
60
- ```
61
-
62
- 2. **Confirm the supervisor and worker PIDs are alive.**
63
-
64
- ```bash
65
- cat "$CHAN/<worker>.pid" # supervisor PID
66
- cat "$CHAN/<worker>.worker-pid" # actual CLI subprocess PID
67
- ps -p "$(cat "$CHAN/<worker>.pid")"
68
- ps -p "$(cat "$CHAN/<worker>.worker-pid")"
69
- ```
70
-
71
- If the supervisor PID is gone but the channel still lists the worker,
72
- you have a ghost entry — clean it with
73
- `trellis channel kill <name> --as <worker> --force`.
74
-
75
- 3. **Tail the worker log.** This is the canonical place to see provider /
76
- MCP / tool startup output that never makes it onto the channel.
77
-
78
- ```bash
79
- tail -f "$CHAN/<worker>.log"
80
- ```
81
-
82
- 4. **Check the last raw events.** A worker that emitted `progress` but no
83
- `message`/`done` is usually mid-stream or blocked on a tool call:
84
-
85
- ```bash
86
- trellis channel messages <channel> --raw --last 50
87
- ```
88
-
89
- Common "alive but silent" causes:
90
-
91
- - Provider cold start before the first token (long, but eventually moves).
92
- - A blocking MCP server during startup — visible in the worker log.
93
- - Worker is waiting for a tool result whose subprocess hung.
94
- - Prompt is huge / model is rate-limited; check provider-side errors in the
95
- worker log.
96
-
97
- ## Progress Event Interpretation
98
-
99
- A `progress` event represents an in-flight piece of work. Its shape varies
100
- by `action` field, but the load-bearing fields are always under `detail`:
101
-
102
- - `detail.text_delta` — incremental model output (concatenate across events
103
- to rebuild the streamed reply).
104
- - `detail.tool_name`, `detail.tool_input` — tool call about to run or
105
- currently running.
106
- - `detail.status` — short string used by long-running actions
107
- (`starting`, `running`, `flushing`, `done`).
108
- - `detail.action` — semantic label (e.g. `status` for thread heartbeats).
109
-
110
- Progress events are **noisy** by design. `wait` ignores them unless you
111
- pass `--include-progress`. When you do want to see them, prefer:
112
-
113
- ```bash
114
- trellis channel messages <channel> --raw --kind progress --last 80
115
- ```
116
-
117
- A stream that emits progress at a steady cadence but never closes with
118
- `done`/`error`/`message` is the classic shape of a hung tool call —
119
- inspect the worker log for the subprocess.
120
-
121
- ## Wait Semantics (Quick Reference)
122
-
123
- Without `--after-seq`, `channel wait` captures the current durable sequence,
124
- then watches matching later events. For an operation that can finish before the
125
- wait command starts, capture a barrier before that operation and pass it back:
126
-
127
- ```bash
128
- BARRIER="$(trellis channel barrier T)"
129
- # spawn or trigger work that may emit a terminal event
130
- trellis channel wait T --as main --from check --kind done,error \
131
- --after-seq "$BARRIER" --timeout 15m
132
- ```
133
-
134
- It wakes on:
135
-
136
- - `message`
137
- - `done`
138
- - `error`
139
- - `killed`
140
- - `progress` only with `--include-progress`
141
-
142
- Useful filters:
143
-
144
- ```bash
145
- trellis channel wait T --as main --from check --kind done --timeout 15m
146
- trellis channel wait T --as main --from check,check-cx --kind done --all --timeout 15m
147
- trellis channel wait T --as worker --kind message --timeout 1h
148
- trellis channel wait T --as main --thread release-note --action status --timeout 10m
149
- ```
150
-
151
- Exit codes: `0` matched, `124` timeout, `1`/`2` errors. On `wait --all`
152
- timeout, stderr names the workers still missing.
153
-
154
- ## Auditing `events.jsonl` — Use Subcommands, Not `grep`
155
-
156
- Every channel persists its full history at `$CHAN/events.jsonl`. It is
157
- tempting to `tail` / `grep` / `jq` this file directly during debugging.
158
- Don't make it a habit, and **never** do it for forum channels.
159
-
160
- Why subcommands first:
161
-
162
- - `messages` already replays the file with filters (`--kind`, `--from`,
163
- `--last`, `--tag`, `--thread`, `--action`) and gives you `--raw` for the
164
- exact JSON. Anything you would write a one-liner for, `messages` already
165
- does.
166
- - `wait` consumes the same file with EOF semantics — re-implementing that
167
- with `tail -f | jq` will drop events under load and misorder them under
168
- rotation.
169
- - `context` materializes a worker's inbox view, including cursor state.
170
- Hand-rolled filters do not respect `<worker>.inbox-cursor`.
171
-
172
- ### Forum channels: never parse `events.jsonl` directly
173
-
174
- Forum channels multiplex many logical threads onto a single `events.jsonl`.
175
- Each event carries `thread`, `action`, and tag fields that the forum
176
- subcommands know how to fold together. Parsing the file by hand will:
177
-
178
- - Mix threads together and make a thread look incoherent.
179
- - Miss thread lifecycle events (open / status / close) that change how
180
- later events should be interpreted.
181
- - Ignore worker inbox cursors, so you will "see" events a worker has
182
- already consumed and assume they are pending.
183
-
184
- Use the forum-aware views instead:
185
-
186
- ```bash
187
- # List logical threads inside the forum channel
188
- trellis channel forum list <channel>
189
-
190
- # Inspect one thread end-to-end
191
- trellis channel thread show <channel> <thread>
192
-
193
- # Replay messages for a thread (supports --raw, --kind, --last)
194
- trellis channel messages <channel> --thread <thread> --raw --last 100
195
-
196
- # What a specific worker still has pending
197
- trellis channel context <channel> --as <worker>
198
- ```
199
-
200
- Direct reads of `events.jsonl` are reserved for the case where the CLI
201
- itself is suspect — e.g. confirming an event was actually persisted, or
202
- diffing against `<worker>.inbox-cursor` while debugging the supervisor.
203
-
204
- ## Common Failures
205
-
206
- | Symptom | Cause | Fix |
207
- | -------------------------------- | ------------------------------------- | --------------------------------------------------------------- |
208
- | `trellis: command not found` | CLI not installed globally | `npm install -g @pennixrv/trellis` |
209
- | `wait` exits immediately | wrong filter or identity collision | use distinct `--as`, inspect raw messages |
210
- | zsh errors on message text | shell interpreted punctuation | use `--stdin` or `--text-file` |
211
- | progress line is cut off | pretty output truncation | use `messages --raw --kind progress` |
212
- | worker never speaks | provider startup / prompt / MCP delay | inspect `<worker>.log`, `ps`, raw events |
213
- | channel not found in another cwd | project bucket mismatch | `cd` to project, use `--scope global`, or `list --all-projects` |
214
- | ghost worker in list | supervisor died without cleanup | `trellis channel kill <name> --as <worker> --force` |
215
- | forum thread looks scrambled | parsed `events.jsonl` directly | use `forum`, `thread`, `messages --thread` |
216
-
217
- ## Storage Layout
218
-
219
- ```text
220
- ~/.trellis/channels/
221
- └── <bucket>/
222
- └── <channel-name>/
223
- ├── events.jsonl
224
- ├── <channel>.lock
225
- ├── <worker>.log
226
- ├── <worker>.pid
227
- ├── <worker>.worker-pid
228
- ├── <worker>.config
229
- ├── <worker>.session-id
230
- ├── <worker>.thread-id
231
- ├── <worker>.inbox-cursor
232
- └── <worker>.spawnlock
233
- ```
234
-
235
- Agents normally use the CLI, not direct file reads. Direct file reads are
236
- for debugging when CLI views are insufficient — and even then, never on a
237
- forum channel's `events.jsonl`.
@@ -1,222 +0,0 @@
1
- # Bounded Subnode Work
2
-
3
- Use a `subnode` only when the user explicitly needs independently reviewable
4
- evidence for a bounded analysis, design, audit, review, counterargument, or
5
- verification question. It is not the normal path for an ordinary static review,
6
- implementation, memory retrieval, or routine tool call.
7
-
8
- The coordinator owns task facts, protected targets, acceptance, Git, worker
9
- lifecycle, and the final result. A subnode owns one evidence report and its own
10
- append-only worklog. This is a behavioral contract; do not add `--sandbox` or
11
- claim that path restrictions enforce it.
12
-
13
- ## Artifact Setup
14
-
15
- Before spawning, the coordinator must use an active task (`planning` or
16
- `in_progress`), define one stable `work_id` and
17
- `subnode_id`, then prepare a brief-draft JSON with the question, independence
18
- reason, scope, protected targets, lens, evidence method, source snapshot,
19
- dependencies, stop conditions, deadline, and `channel_ref`. Set `retry_of`
20
- only for an explicit manual retry and `counter_of` only for intentional
21
- counterwork. A retry names an existing, different subnode in the same task and
22
- `work_id`; counterwork may be initialized independently. The helper supplies
23
- the immutable task identity and report path.
24
-
25
- ```bash
26
- TASK=.trellis/tasks/09-07-example
27
- WORK_ID=security-audit
28
- SUBNODE_ID=dependency-evidence
29
-
30
- python3 .trellis/scripts/subnode_artifact.py init \
31
- --task "$TASK" \
32
- --work-id "$WORK_ID" \
33
- --subnode-id "$SUBNODE_ID" \
34
- --draft /tmp/subnode-brief.json
35
- ```
36
-
37
- This creates exactly:
38
-
39
- ```text
40
- $TASK/subnodes/$WORK_ID/$SUBNODE_ID/
41
- brief.json # coordinator-owned and immutable after dispatch
42
- worklog.md # subnode appends material progress and corrections
43
- report.json # subnode-owned final pending-review result
44
- disposition.json # coordinator-owned, create-once result decision
45
- ```
46
-
47
- Do not use a Channel command or message body as the report transport. The
48
- subnode's short final assistant reply names the already-written `report.json`
49
- and its status; the Codex supervisor projects that reply into the durable
50
- Channel message and `done` events. The durable JSON file carries the
51
- reviewable result.
52
-
53
- The subnode copies identity, scope, and lens from `brief.json`. Schema version 2
54
- requires one `scope_assessment` entry for every brief scope item, structured
55
- findings with evidence references, and typed uncertainties or corrections when
56
- present. Schema version 1 is retired and the validator rejects it. The minimal
57
- complete report is:
58
-
59
- ```json
60
- {
61
- "schema_version": 2,
62
- "task_id": "task-id-from-brief",
63
- "work_id": "work-id-from-brief",
64
- "subnode_id": "subnode-id-from-brief",
65
- "role_id": "subnode",
66
- "status": "complete",
67
- "scope": ["exact scope copied from brief"],
68
- "lens": "exact lens copied from brief",
69
- "scope_assessment": [
70
- {
71
- "scope": "exact scope item from brief",
72
- "status": "covered",
73
- "conclusion": "What this scope establishes.",
74
- "evidence_ids": ["stable-evidence-id"]
75
- }
76
- ],
77
- "evidence": [
78
- {
79
- "id": "stable-evidence-id",
80
- "locator": "source path, URL, or command receipt",
81
- "summary": "What this independently reviewable evidence establishes."
82
- }
83
- ],
84
- "findings": [
85
- {
86
- "id": "finding-id",
87
- "conclusion": "Bounded conclusion.",
88
- "evidence_ids": ["stable-evidence-id"]
89
- }
90
- ],
91
- "uncertainties": [],
92
- "corrections": []
93
- }
94
- ```
95
-
96
- Append a checkpoint marker to `worklog.md` when a material unit is complete or
97
- blocked. It is a bounded recovery projection, not coordinator acceptance:
98
-
99
- ```text
100
- <!-- trellis-checkpoint: {"id":"checkpoint-1","covered_scope":["exact scope item"],"evidence_ids":["stable-evidence-id"],"conclusion_or_blocker":"Current conclusion or blocker.","unknowns":[],"safe_resume_point":"Next safe action."} -->
101
- ```
102
-
103
- The validator returns `review_concern` for missing or incomplete checkpoint
104
- coverage and for inconclusive scope assessments so the coordinator can inspect
105
- them. Identity, schema, path, and malformed-structure failures remain hard
106
- errors. A concern is never automatic acceptance or rejection.
107
-
108
- For `blocked`, `incomplete`, or `error`, include the same base fields plus a
109
- `completed_scope` list (empty when no assigned scope started) and a non-empty
110
- `blocker` string. Never use
111
- `accepted`, `rejected`, or `deferred` as a report status.
112
-
113
- ## Dispatch And Wait
114
-
115
- Inspect the installed role first, then capture a durable event barrier before
116
- the worker can emit a terminal event. The CLI waits once and replays matching
117
- events committed after that barrier:
118
-
119
- ```bash
120
- trellis channel create subnode-example --by main --cwd "$PWD"
121
- BARRIER="$(trellis channel barrier subnode-example)"
122
- trellis channel spawn subnode-example --agent subnode --provider codex \
123
- --as "$SUBNODE_ID" --cwd "$PWD"
124
-
125
- printf '%s\n' "Read $TASK/subnodes/$WORK_ID/$SUBNODE_ID/brief.json and perform only that bounded work." \
126
- | trellis channel send subnode-example --as main --to "$SUBNODE_ID" \
127
- --stdin --delivery-mode requireRunningWorker
128
-
129
- trellis channel wait subnode-example --as main --from "$SUBNODE_ID" \
130
- --kind done,error,killed --after-seq "$BARRIER" --timeout 30m
131
- ```
132
-
133
- `channel.subnode` in `.trellis/config.yaml` supplies the role defaults for
134
- `max_live_workers` (generated default `8`), `idle_timeout`, `timeout`, and
135
- `warn_before`. Change that section before a dispatch group when its resource
136
- or lifetime needs differ; pass the corresponding `spawn` flag only for a
137
- one-off override. The generic `channel.worker_guard` remains the fallback for
138
- ordinary workers and for a subnode key omitted from the project config.
139
-
140
- Where the host exposes a live wait continuation, capture the same barrier,
141
- establish one event waiter before triggering the worker, and continue that same
142
- waiter until terminal state. Until it resolves, times out, or errors, the next
143
- host operation is only that continuation: do not create another waiter or run
144
- shell/CLI diagnostics, including `channel messages`, worker inspection, or
145
- status/list commands. Do not treat an empty transport slice as completion.
146
- After the waiter returns, use those commands only for an on-demand diagnosis,
147
- not as a high-frequency supervision loop.
148
-
149
- ## Coordinator Review
150
-
151
- After the subnode's final reply, independently validate and then record a
152
- task-level disposition. `complete` means only that the subnode claims it
153
- completed its assigned work; it is not acceptance. Confirm the terminal state
154
- from the durable worker projection; a report without a terminal worker is
155
- still pending, and a terminal worker without a valid report is recovery.
156
-
157
- ```bash
158
- REPORT="$TASK/subnodes/$WORK_ID/$SUBNODE_ID/report.json"
159
- python3 .trellis/scripts/subnode_artifact.py validate --report "$REPORT"
160
- trellis channel workers subnode-example --include-terminal --json
161
- ```
162
-
163
- The coordinator must re-check enough source evidence and protected-target state
164
- to decide `accepted`, `rejected`, or `deferred`. Record the terminal lifecycle
165
- and sequence returned by `channel workers`, then let the helper create the
166
- disposition exactly once:
167
-
168
- ```bash
169
- python3 .trellis/scripts/subnode_artifact.py disposition \
170
- --report "$REPORT" \
171
- --outcome accepted \
172
- --terminal-lifecycle done \
173
- --terminal-seq 17 \
174
- --terminal-at 2026-09-14T03:00:00Z \
175
- --check report_validation \
176
- --check source_recheck \
177
- --check protected_target_check \
178
- --reason "Evidence and protected targets were independently rechecked."
179
- ```
180
-
181
- `disposition.json` is coordinator-owned and cannot be replaced. The helper
182
- does not inspect the Channel store or make the acceptance judgment; the
183
- terminal values must come from the worker projection and the reason records
184
- the coordinator's decision.
185
-
186
- Use the separate coordinator work-record helper only for a durable cross-task
187
- observation, decision, open question, or blocker. It does not substitute for a
188
- task artifact or subnode worklog.
189
-
190
- ```bash
191
- python3 .trellis/scripts/workspace_note.py \
192
- --kind decision \
193
- --summary "Accepted independent dependency evidence for the release gate." \
194
- --source "$REPORT"
195
- ```
196
-
197
- ## Counterwork
198
-
199
- Counterwork is a new, independently scoped subnode, not a retry. It must use a
200
- different `subnode_id`, lens, and evidence identities, and its brief sets
201
- `counter_of` to the primary subnode ID. After both reports are complete:
202
-
203
- ```bash
204
- python3 .trellis/scripts/subnode_artifact.py validate-counter \
205
- --primary "$TASK/subnodes/$WORK_ID/primary" \
206
- --counter "$TASK/subnodes/$WORK_ID/counter"
207
- ```
208
-
209
- The coordinator compares the two reports and retains the comparison as part of
210
- its own disposition.
211
-
212
- ## Manual Retry
213
-
214
- A retry is a fresh, explicitly approved subnode after a recorded failed or
215
- incomplete attempt. It uses a new `subnode_id`, preserves the old artifacts,
216
- and sets `retry_of` to that prior subnode ID in its brief. The coordinator must
217
- record why it is retrying and check the new report independently; neither the
218
- helper nor Channel decides when to retry.
219
-
220
- No scheduler, high-frequency polling loop, automatic retry, worktree, global
221
- ledger, or provider-specific transport is introduced by this workflow. A
222
- manual retry always uses a new subnode id and worker handle.