@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
@@ -8,15 +8,15 @@
8
8
  * - create a per-worker mutable context (`createCtx`)
9
9
  * - optionally run a handshake before user messages flow (`handshake`)
10
10
  * - report readiness for user input (`isReady`)
11
- * - parse a line of stdout into channel events (`parseLine`)
12
- * - encode a channel user message for stdin (`encodeUserMessage`)
11
+ * - parse a line of stdout into Teamwork Session events (`parseLine`)
12
+ * - encode a Teamwork Session user message for stdin (`encodeUserMessage`)
13
13
  *
14
14
  * `getAdapter(name)` returns the right adapter. supervisor.ts and spawn.ts
15
15
  * stay provider-agnostic — adding a new provider means writing a new
16
16
  * `<name>.ts` adapter and registering it here.
17
17
  */
18
18
  import { buildClaudeArgs, encodeClaudeInterruptMessage, encodeClaudeUserMessage, parseClaudeLine, } from "./claude.js";
19
- import { buildCodexArgs, buildCodexThreadStartParams, cancelCodexResponse, createCodexCtx, encodeCodexInterruptMessage, encodeCodexRequestWithResponse, encodeCodexUserMessage, parseCodexLine, } from "./codex.js";
19
+ import { buildCodexArgs, buildCodexThreadStartParams, createCodexCtx, encodeCodexInterruptMessage, encodeCodexRequest, encodeCodexUserMessage, parseCodexLine, } from "./codex.js";
20
20
  /** Claude adapter — stream-json over stdio, no handshake. */
21
21
  const claudeAdapter = {
22
22
  provider: "claude",
@@ -55,26 +55,22 @@ const codexAdapter = {
55
55
  },
56
56
  async handshake({ child, ctx, view }) {
57
57
  // 1. initialize
58
- const init = encodeCodexRequestWithResponse(ctx, "initialize", {
59
- clientInfo: { name: "trellis-channel", version: "0.1" },
58
+ const init = encodeCodexRequest(ctx, "initialize", {
59
+ clientInfo: { name: "trellis-teamwork", version: "0.1" },
60
60
  capabilities: {},
61
61
  }, "initialize");
62
62
  child.stdin.write(init.line);
63
- const initResult = await awaitCodexResponse(child, ctx, init.id, init.response, "initialize");
64
- if (!isObject(initResult)) {
65
- throw new Error("Codex initialize returned an invalid result");
66
- }
67
- // 2. complete the app-server handshake before starting a thread
68
- child.stdin.write(JSON.stringify({
69
- jsonrpc: "2.0",
70
- method: "initialized",
71
- params: {},
72
- }) + "\n");
73
- const ts = encodeCodexRequestWithResponse(ctx, "thread/start", buildCodexThreadStartParams(view.cwd, view.systemPrompt, view.sandbox), "thread/start");
63
+ // 2. wait briefly so initialize lands first
64
+ await sleep(150);
65
+ const ts = encodeCodexRequest(ctx, "thread/start", buildCodexThreadStartParams(view.cwd, view.systemPrompt, view.sandbox), "thread/start");
74
66
  child.stdin.write(ts.line);
75
- await awaitCodexResponse(child, ctx, ts.id, ts.response, "thread/start");
67
+ // 3. wait for thread/start response to populate threadId
68
+ const deadline = Date.now() + 30_000;
69
+ while (!ctx.threadId && Date.now() < deadline) {
70
+ await sleep(50);
71
+ }
76
72
  if (!ctx.threadId) {
77
- throw new Error("Codex thread/start returned no threadId");
73
+ throw new Error("Codex thread/start did not produce a threadId within 30s");
78
74
  }
79
75
  },
80
76
  isReady(ctx) {
@@ -114,39 +110,7 @@ export function getAdapter(provider) {
114
110
  }
115
111
  return a;
116
112
  }
117
- function awaitCodexResponse(child, ctx, id, response, label) {
118
- return new Promise((resolve, reject) => {
119
- let settled = false;
120
- const cleanup = () => {
121
- child.removeListener("exit", onExit);
122
- child.removeListener("error", onError);
123
- };
124
- const finish = (fn) => {
125
- if (settled)
126
- return;
127
- settled = true;
128
- cleanup();
129
- fn();
130
- };
131
- const onExit = (code, signal) => {
132
- const detail = signal ?? (code === null ? "unknown" : `code ${code}`);
133
- cancelCodexResponse(ctx, id, new Error(`Codex ${label} response interrupted by child exit (${detail})`));
134
- finish(() => reject(new Error(`Codex ${label} response interrupted by child exit (${detail})`)));
135
- };
136
- const onError = (error) => {
137
- cancelCodexResponse(ctx, id, error);
138
- finish(() => reject(error));
139
- };
140
- if (child.exitCode !== null || child.signalCode !== null) {
141
- onExit(child.exitCode, child.signalCode);
142
- return;
143
- }
144
- child.once("exit", onExit);
145
- child.once("error", onError);
146
- response.then((result) => finish(() => resolve(result)), (error) => finish(() => reject(error instanceof Error ? error : new Error(String(error)))));
147
- });
148
- }
149
- function isObject(value) {
150
- return typeof value === "object" && value !== null && !Array.isArray(value);
113
+ function sleep(ms) {
114
+ return new Promise((r) => setTimeout(r, ms));
151
115
  }
152
116
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/teamwork/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,uBAAuB,EACvB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,cAAc,EACd,2BAA2B,EAC3B,cAAc,EACd,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,GAGf,MAAM,YAAY,CAAC;AAmEpB,6DAA6D;AAC7D,MAAM,aAAa,GAA6B;IAC9C,QAAQ,EAAE,QAAQ;IAClB,SAAS,CAAC,IAAI;QACZ,OAAO,eAAe,CAAC;YACrB,eAAe,EAAE,IAAI,CAAC,MAAM;YAC5B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;SACxC,CAAC,CAAC;IACL,CAAC;IACD,SAAS;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO;QACL,OAAO,IAAI,CAAC;IACd,CAAC;IACD,SAAS,CAAC,IAAI;QACZ,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACD,iBA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IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ChannelEventKind } from "../store/events.js";
1
+ import type { TeamworkEventKind } from "../store/events.js";
2
2
  /**
3
3
  * Event emitted by an adapter from a single line of worker stdout.
4
4
  *
@@ -6,7 +6,7 @@ import type { ChannelEventKind } from "../store/events.js";
6
6
  * appending to events.jsonl. Adapter only decides `kind` + payload.
7
7
  */
8
8
  export interface AdapterEvent {
9
- kind: ChannelEventKind;
9
+ kind: TeamworkEventKind;
10
10
  /** Free-form payload merged into the event. */
11
11
  payload?: Record<string, unknown>;
12
12
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/commands/teamwork/adapters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,iBAAiB,CAAC;IACxB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oFAAoF;IACpF,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAChE;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/commands/teamwork/adapters/types.ts"],"names":[],"mappings":""}
@@ -2,7 +2,7 @@
2
2
  * Load a Trellis agent definition from `.trellis/agents/<name>.md`.
3
3
  *
4
4
  * Format: YAML frontmatter (between `---` fences) + markdown body.
5
- * The body becomes the system prompt injected into the worker.
5
+ * The body becomes the system prompt injected into the teammate session.
6
6
  *
7
7
  * ---
8
8
  * name: architect
@@ -10,13 +10,12 @@
10
10
  * provider: claude # claude | codex; used as default --provider
11
11
  * model: claude-opus-4-7 # CLI-specific model id; optional
12
12
  * labels: [design] # optional metadata
13
- * env_file: subnode.env # optional role environment, relative to this file
14
13
  * ---
15
14
  *
16
15
  * You are a senior system architect ...
17
16
  *
18
17
  * Unknown frontmatter fields are preserved as metadata but ignored by
19
- * channel runtime (except the supported `env_file` role asset field).
18
+ * Teamwork runtime (they may be consumed by other Trellis layers).
20
19
  */
21
20
  export interface AgentDefinition {
22
21
  name: string;
@@ -24,7 +23,6 @@ export interface AgentDefinition {
24
23
  provider?: "claude" | "codex";
25
24
  model?: string;
26
25
  labels?: string[];
27
- envFile?: string;
28
26
  systemPrompt: string;
29
27
  raw: Record<string, string>;
30
28
  filePath: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-loader.d.ts","sourceRoot":"","sources":["../../../src/commands/teamwork/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAMD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,MAAM,EAAO,GAC1B,MAAM,GAAG,IAAI,CA8Bf;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAsB,EAC3B,YAAY,GAAE,MAAM,EAAO,GAC1B,eAAe,CAyCjB"}
@@ -2,7 +2,7 @@
2
2
  * Load a Trellis agent definition from `.trellis/agents/<name>.md`.
3
3
  *
4
4
  * Format: YAML frontmatter (between `---` fences) + markdown body.
5
- * The body becomes the system prompt injected into the worker.
5
+ * The body becomes the system prompt injected into the teammate session.
6
6
  *
7
7
  * ---
8
8
  * name: architect
@@ -10,13 +10,12 @@
10
10
  * provider: claude # claude | codex; used as default --provider
11
11
  * model: claude-opus-4-7 # CLI-specific model id; optional
12
12
  * labels: [design] # optional metadata
13
- * env_file: subnode.env # optional role environment, relative to this file
14
13
  * ---
15
14
  *
16
15
  * You are a senior system architect ...
17
16
  *
18
17
  * Unknown frontmatter fields are preserved as metadata but ignored by
19
- * channel runtime (except the supported `env_file` role asset field).
18
+ * Teamwork runtime (they may be consumed by other Trellis layers).
20
19
  */
21
20
  import fs from "node:fs";
22
21
  import path from "node:path";
@@ -25,7 +24,7 @@ const SAFE_AGENT_NAME = /^[A-Za-z0-9._-]+$/;
25
24
  export function findAgentFile(name, cwd, trustedRoots = []) {
26
25
  // Reject path-traversal attempts (`..`, `/`, etc.) — agent names must be
27
26
  // a single safe identifier. Without this, `--agent ../../etc/passwd`
28
- // would read arbitrary host files into the worker system prompt.
27
+ // would read arbitrary host files into the teammate system prompt.
29
28
  if (!SAFE_AGENT_NAME.test(name)) {
30
29
  throw new Error(`Agent name '${name}' is not allowed (must match ${SAFE_AGENT_NAME.source})`);
31
30
  }
@@ -72,47 +71,17 @@ export function loadAgent(name, cwd = process.cwd(), trustedRoots = []) {
72
71
  .map((s) => s.trim())
73
72
  .filter(Boolean)
74
73
  : undefined;
75
- const envFile = fm.env_file
76
- ? resolveAgentEnvFile(file, fm.env_file, cwd, trustedRoots)
77
- : undefined;
78
74
  return {
79
75
  name: fm.name?.trim() || name,
80
76
  description: fm.description?.trim() || undefined,
81
77
  provider,
82
78
  model: fm.model?.trim() || undefined,
83
79
  labels,
84
- ...(envFile ? { envFile } : {}),
85
80
  systemPrompt: body,
86
81
  raw: fm,
87
82
  filePath: file,
88
83
  };
89
84
  }
90
- function resolveAgentEnvFile(agentFile, declaredPath, cwd, trustedRoots) {
91
- const value = declaredPath.trim();
92
- const agentDir = path.dirname(agentFile);
93
- const candidate = path.resolve(agentDir, value);
94
- const relative = path.relative(agentDir, candidate);
95
- if (!value ||
96
- path.isAbsolute(value) ||
97
- value.includes("\0") ||
98
- !relative ||
99
- relative === ".." ||
100
- relative.startsWith(`..${path.sep}`) ||
101
- path.isAbsolute(relative)) {
102
- throw new Error(`Agent env_file '${declaredPath}' must name a relative file beside the agent definition`);
103
- }
104
- if (!fs.existsSync(candidate) || !fs.statSync(candidate).isFile()) {
105
- throw new Error(`Agent env_file '${declaredPath}' declared by ${agentFile} does not exist or is not a regular file`);
106
- }
107
- const agentsRoot = path.resolve(cwd, ".trellis", "agents");
108
- const real = fs.realpathSync(candidate);
109
- const inAgentsRoot = real === agentsRoot || real.startsWith(agentsRoot + path.sep);
110
- const inTrustedRoot = trustedRoots.some((root) => real === root || real.startsWith(root + path.sep));
111
- if (!inAgentsRoot && !inTrustedRoot) {
112
- throw new Error(`Agent env_file '${declaredPath}' resolves outside the trusted agent roots`);
113
- }
114
- return candidate;
115
- }
116
85
  function normalizeProvider(v) {
117
86
  if (!v)
118
87
  return undefined;
@@ -154,7 +123,7 @@ function parseFrontmatter(text) {
154
123
  const key = m[1];
155
124
  const inline = m[2];
156
125
  if (FORBIDDEN_KEYS.has(key)) {
157
- process.stderr.write(`[channel agent-loader] refusing dangerous frontmatter key '${key}'\n`);
126
+ process.stderr.write(`[teamwork agent-loader] refusing dangerous frontmatter key '${key}'\n`);
158
127
  // Still need to consume any block scalar continuation lines.
159
128
  if (inline === "|" || inline === ">") {
160
129
  i++;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-loader.js","sourceRoot":"","sources":["../../../src/commands/teamwork/agent-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAa7B,MAAM,iBAAiB,GAAG,0CAA0C,CAAC;AAErE,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAE5C,MAAM,UAAU,aAAa,CAC3B,IAAY,EACZ,GAAW,EACX,eAAyB,EAAE;IAE3B,yEAAyE;IACzE,qEAAqE;IACrE,mEAAmE;IACnE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,eAAe,IAAI,gCAAgC,eAAe,CAAC,MAAM,GAAG,CAC7E,CAAC;IACJ,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,IAAI,KAAK,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC;KACxC,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,sEAAsE;QACtE,oEAAoE;QACpE,kEAAkE;QAClE,MAAM,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvD,MAAM,YAAY,GAChB,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,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SAAS;QACX,CAAC;QAED,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACrC,qDAAqD;YACrD,MAAM,KAAK,GAAa,EAAE,CAAC;YAC3B,CAAC,EAAE,CAAC;YACJ,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBACxB,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;gBACtB,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;oBAAE,MAAM;gBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;gBACtC,CAAC,EAAE,CAAC;YACN,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACzB,CAAC,EAAE,CAAC;QACN,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,177 @@
1
+ import type { TeammateLaunchSpec } from "./teammate-launch.js";
2
+ export type ReportStatus = "complete" | "blocked" | "incomplete" | "error";
3
+ export type CoordinationMode = "general" | "advisor" | "committee";
4
+ export interface TeammateAssignment {
5
+ assignmentId: string;
6
+ evaluationGroup?: {
7
+ id: string;
8
+ kind: "committee";
9
+ };
10
+ briefPath: string;
11
+ roleId: "teammate";
12
+ provider: "claude" | "codex" | "dsh" | "copilot";
13
+ profile?: string;
14
+ model?: string;
15
+ summary: string;
16
+ scope: string;
17
+ lens: string;
18
+ briefDigest: string;
19
+ sourceDigest: string;
20
+ contextFiles?: string[];
21
+ contextManifests?: string[];
22
+ acceptance: string[];
23
+ maxRetries: number;
24
+ }
25
+ export interface TeamworkPlan {
26
+ schemaVersion: 1;
27
+ taskId: string;
28
+ batchId: string;
29
+ sessionId: string;
30
+ phaseId: string;
31
+ taskRouteRevision: string;
32
+ inputRevision: string;
33
+ planSummary: string;
34
+ coordinationMode: CoordinationMode;
35
+ planHash: string;
36
+ requestedCapacity?: number;
37
+ assignments: TeammateAssignment[];
38
+ deadline: string;
39
+ protectedTargets: string[];
40
+ }
41
+ export interface TeamworkPlanContext {
42
+ taskId: string;
43
+ phaseId: string;
44
+ taskRouteRevision: string;
45
+ inputRevision: string;
46
+ }
47
+ export interface TeammateReport {
48
+ schemaVersion: 1;
49
+ taskId: string;
50
+ batchId: string;
51
+ assignmentId: string;
52
+ attemptId: string;
53
+ teammateId: string;
54
+ planHash: string;
55
+ phaseId: string;
56
+ taskRouteRevision: string;
57
+ inputRevision: string;
58
+ status: ReportStatus;
59
+ sourceDigest: string;
60
+ evidence: {
61
+ id: string;
62
+ locator: string;
63
+ summary: string;
64
+ }[];
65
+ }
66
+ interface TeammateIdentity {
67
+ taskId: string;
68
+ batchId: string;
69
+ assignmentId: string;
70
+ attemptId: string;
71
+ teammateId: string;
72
+ }
73
+ export type TeammateDispositionStatus = "accepted" | "final_failed";
74
+ export type TeammateArtifactIdentity = TeammateIdentity;
75
+ export interface TeammateClaim extends TeammateIdentity {
76
+ schemaVersion: 1;
77
+ planHash: string;
78
+ briefDigest?: string;
79
+ sourceDigest: string;
80
+ slot: number;
81
+ status: "issued";
82
+ execution?: TeammateExecutionSnapshot;
83
+ }
84
+ export interface TeammateExecutionSnapshot {
85
+ roleId: "teammate";
86
+ provider: "claude" | "codex" | "dsh" | "copilot";
87
+ profile?: string;
88
+ model?: string;
89
+ reasoningEffort?: "medium" | "high" | "xhigh";
90
+ options: Record<string, string | number | boolean>;
91
+ profileDigest?: string;
92
+ roleDigest: string;
93
+ contextDigest: string;
94
+ capabilityDigest: string;
95
+ }
96
+ export interface TeammateDisposition extends TeammateArtifactIdentity {
97
+ schemaVersion: 1;
98
+ status: TeammateDispositionStatus;
99
+ sourceDigest: string;
100
+ reason?: string;
101
+ }
102
+ export interface TeammateQueueFact {
103
+ schemaVersion: 1;
104
+ taskId: string;
105
+ batchId: string;
106
+ assignmentId: string;
107
+ planHash: string;
108
+ briefDigest: string;
109
+ sourceDigest: string;
110
+ briefPath: string;
111
+ queueIndex: number;
112
+ status: "queued";
113
+ }
114
+ export declare function computeTeamworkPlanHash(value: unknown): string;
115
+ export declare function validateTeamworkPlan(input: unknown, taskRoot: string, expectedContext?: TeamworkPlanContext): TeamworkPlan;
116
+ export declare function validateTeammateReport(input: unknown, identity: Pick<TeammateReport, "taskId" | "batchId" | "assignmentId" | "attemptId" | "teammateId" | "planHash" | "phaseId" | "taskRouteRevision" | "inputRevision">, expectedSourceDigest: string): TeammateReport;
117
+ export declare function validateTeammateQueueFact(input: unknown, identity: Pick<TeammateQueueFact, "taskId" | "batchId" | "assignmentId">, expectedPlanHash: string, expectedBriefDigest: string, expectedSourceDigest: string): TeammateQueueFact;
118
+ export declare function validateTeammateClaim(input: unknown, identity: TeammateArtifactIdentity, expectedPlanHash: string, expectedSourceDigest: string, expectedBriefDigest?: string): TeammateClaim;
119
+ export declare function validateTeammateDisposition(input: unknown, identity: TeammateArtifactIdentity, expectedSourceDigest: string): TeammateDisposition;
120
+ export declare function writeTeammateClaim(input: {
121
+ taskRoot: string;
122
+ briefPath: string;
123
+ identity: TeammateArtifactIdentity;
124
+ planHash: string;
125
+ briefDigest: string;
126
+ sourceDigest: string;
127
+ slot: number;
128
+ launch?: TeammateLaunchSpec;
129
+ }): void;
130
+ export declare function writeTeammateQueueFact(input: {
131
+ taskRoot: string;
132
+ briefPath: string;
133
+ taskId: string;
134
+ batchId: string;
135
+ assignmentId: string;
136
+ planHash: string;
137
+ briefDigest: string;
138
+ sourceDigest: string;
139
+ queueIndex: number;
140
+ }): void;
141
+ export declare function appendTeammateWorklog(input: {
142
+ taskRoot: string;
143
+ briefPath: string;
144
+ attemptId: string;
145
+ checkpoint: string;
146
+ }): void;
147
+ export declare function writeTeammateReport(input: {
148
+ taskRoot: string;
149
+ briefPath: string;
150
+ identity: Pick<TeammateReport, "taskId" | "batchId" | "assignmentId" | "attemptId" | "teammateId" | "planHash" | "phaseId" | "taskRouteRevision" | "inputRevision">;
151
+ sourceDigest: string;
152
+ status: ReportStatus;
153
+ evidence: TeammateReport["evidence"];
154
+ }): void;
155
+ export declare function assertTeammateWriteAllowed(target: string, protectedTargets: readonly string[]): void;
156
+ export declare function writeTeammateDisposition(input: {
157
+ taskRoot: string;
158
+ briefPath: string;
159
+ identity: TeammateArtifactIdentity;
160
+ sourceDigest: string;
161
+ status: TeammateDispositionStatus;
162
+ reason?: string;
163
+ }): void;
164
+ export declare function readTeammateReport(input: {
165
+ taskRoot: string;
166
+ briefPath: string;
167
+ attemptId: string;
168
+ identity: Pick<TeammateReport, "taskId" | "batchId" | "assignmentId" | "teammateId" | "planHash" | "phaseId" | "taskRouteRevision" | "inputRevision">;
169
+ sourceDigest: string;
170
+ }): TeammateReport;
171
+ export declare function cleanupSettledTeamworkArtifacts(input: {
172
+ taskRoot: string;
173
+ assignments: TeamworkPlan["assignments"];
174
+ acceptedAttempts: ReadonlyMap<string, string>;
175
+ }): string[];
176
+ export {};
177
+ //# sourceMappingURL=artifact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifact.d.ts","sourceRoot":"","sources":["../../../src/commands/teamwork/artifact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,WAAW,CAAA;KAAE,CAAC;IACpD,S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