@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
@@ -162,7 +162,7 @@ def _resolve_active_task(root: Path, input_data: dict):
162
162
 
163
163
  def get_active_task(
164
164
  root: Path, input_data: dict
165
- ) -> tuple[str, str, str] | None:
165
+ ) -> tuple[str, str, str, str | None] | None:
166
166
  """Return active task data, a task-record error, or no task pointer.
167
167
 
168
168
  ``(task_id, "task_error", source)`` is distinct from ``None``: a session
@@ -171,9 +171,6 @@ def get_active_task(
171
171
  prompt.
172
172
  """
173
173
  active = _resolve_active_task(root, input_data)
174
- if active.source_type == "unbound_ambiguous":
175
- candidates = ", ".join(active.candidate_paths)
176
- return candidates, "unbound_ambiguous", active.source
177
174
  if not active.task_path:
178
175
  return None
179
176
 
@@ -181,25 +178,34 @@ def get_active_task(
181
178
  if not task_dir.is_absolute():
182
179
  task_dir = root / task_dir
183
180
  if active.stale:
184
- return task_dir.name, f"stale_{active.source_type}", active.source
181
+ return task_dir.name, f"stale_{active.source_type}", active.source, None
185
182
 
186
183
  task_json = task_dir / "task.json"
187
184
  if not task_json.is_file():
188
- return task_dir.name, "task_error", active.source
185
+ return task_dir.name, "task_error", active.source, None
189
186
  try:
190
187
  data = json.loads(task_json.read_text(encoding="utf-8"))
191
188
  except (json.JSONDecodeError, OSError):
192
- return task_dir.name, "task_error", active.source
189
+ return task_dir.name, "task_error", active.source, None
193
190
  if not isinstance(data, dict):
194
- return task_dir.name, "task_error", active.source
191
+ return task_dir.name, "task_error", active.source, None
195
192
 
196
193
  task_id = data.get("id") or task_dir.name
197
194
  status = data.get("status", "")
198
195
  if not isinstance(status, str) or not status:
199
- return task_dir.name, "task_error", active.source
200
- if active.source_type == "unbound":
201
- return task_id, "unbound_task", active.source
202
- return task_id, status, active.source
196
+ return task_dir.name, "task_error", active.source, None
197
+ phase_workflow = data.get("meta", {}).get("task_workflow") if isinstance(data.get("meta"), dict) else None
198
+ if isinstance(phase_workflow, dict):
199
+ phase_id = phase_workflow.get("current_phase_id")
200
+ phases = phase_workflow.get("phases")
201
+ if phase_id is None:
202
+ routed = phase_workflow.get("phase_ids")
203
+ phase_id = routed[-1] if isinstance(routed, list) and routed else None
204
+ phase = phases.get(phase_id) if isinstance(phases, dict) and isinstance(phase_id, str) else None
205
+ if isinstance(phase_id, str) and isinstance(phase, dict):
206
+ phase_status = phase.get("status")
207
+ return task_id, phase_id, active.source, phase_status if isinstance(phase_status, str) else None
208
+ return task_id, status, active.source, None
203
209
 
204
210
 
205
211
  # ---------------------------------------------------------------------------
@@ -317,14 +323,13 @@ def prompt_has_skip_keyword(prompt: str, keyword: str) -> bool:
317
323
  def _resolve_codex_dispatch_mode(config: dict) -> str:
318
324
  """Normalize `codex.dispatch_mode` from .trellis/config.yaml to "auto" or "inline".
319
325
 
320
- Defaults to `inline`. `auto` explicitly enables native dispatch; the
321
- legacy `sub-agent` value is an alias for `auto`. Any other explicit value
322
- (including invalid ones) falls back to `inline`
326
+ Defaults to `auto`. The legacy `sub-agent` value is an alias for `auto`.
327
+ Any other explicit value (including invalid ones) falls back to `inline`
323
328
  without per-turn warnings. Shared by `_codex_mode_banner` (the per-turn
324
329
  banner) and `resolve_breadcrumb_key` (the breadcrumb tag key) so the two
325
330
  stay in lockstep.
326
331
  """
327
- mode = "inline"
332
+ mode = "auto"
328
333
  if isinstance(config, dict):
329
334
  codex_cfg = config.get("codex")
330
335
  if isinstance(codex_cfg, dict):
@@ -342,16 +347,16 @@ def _codex_mode_banner(config: dict) -> str:
342
347
  """Emit a `<codex-mode>` banner for the additionalContext payload.
343
348
 
344
349
  Reads `codex.dispatch_mode` from .trellis/config.yaml; defaults to
345
- `inline`, so the main session implements and checks directly. `auto`
346
- explicitly dispatches Trellis sub-agents using native Codex context
350
+ `auto`, which dispatches Trellis sub-agents using native Codex context
347
351
  injection with a child-side fallback. This does not rely on inherited
348
352
  parent transcripts: `fork_turns` remains caller-controlled, and
349
353
  fresh-history sub-agents still receive their explicit delegated task and
350
- inherited session configuration. The legacy `sub-agent` value is an alias
351
- for `auto`. Invalid explicit values fall back to `inline` without per-turn
352
- warnings. The banner makes the active mode explicit to Codex AI per turn,
353
- complementing the workflow-state body which is per-status. Mode tells AI
354
- which dispatch protocol to follow; workflow-state tells AI what step it's at.
354
+ inherited session configuration. `inline` is an explicit opt-out; the
355
+ legacy `sub-agent` value is an alias for `auto`. Invalid explicit values
356
+ fall back to `inline` without per-turn warnings. The banner makes the
357
+ active mode explicit to Codex AI per turn, complementing the workflow-state
358
+ body which is per-status. Mode tells AI which dispatch protocol to follow;
359
+ workflow-state tells AI what step it's at.
355
360
  """
356
361
  mode = _resolve_codex_dispatch_mode(config)
357
362
  if mode == "auto":
@@ -373,12 +378,12 @@ def resolve_breadcrumb_key(
373
378
  ) -> str:
374
379
  """Pick the breadcrumb tag key based on Codex dispatch_mode.
375
380
 
376
- Codex defaults to ``inline`` and therefore uses the parallel
377
- ``<status>-inline`` breadcrumb for main-session execution. Explicit
378
- ``auto`` uses the ordinary ``<status>`` breadcrumb for native
379
- SubagentStart dispatch with child-side fallback; ``sub-agent`` remains an
380
- alias for ``auto``. Invalid explicit values fall back to inline without
381
- per-turn warnings.
381
+ Codex defaults to ``auto`` and therefore uses the ordinary ``<status>``
382
+ breadcrumb for native SubagentStart dispatch with child-side fallback;
383
+ it does not depend on an inherited parent transcript. ``inline`` selects
384
+ the parallel ``<status>-inline`` tag; ``sub-agent`` remains an alias for
385
+ ``auto``. Invalid explicit values fall back to inline without per-turn
386
+ warnings.
382
387
 
383
388
  Non-codex platforms return the plain status unchanged.
384
389
  """
@@ -394,6 +399,7 @@ def build_breadcrumb(
394
399
  templates: dict[str, str],
395
400
  source: str | None = None,
396
401
  breadcrumb_key: str | None = None,
402
+ phase_status: str | None = None,
397
403
  ) -> str:
398
404
  """Build the <workflow-state>...</workflow-state> block.
399
405
 
@@ -408,10 +414,12 @@ def build_breadcrumb(
408
414
  body = templates.get(status)
409
415
  if body is None:
410
416
  body = "Refer to workflow.md for current step."
411
- if status == "unbound_ambiguous":
412
- header = f"Status: {status}\nCandidates: {task_id}"
417
+ if task_id is None:
418
+ header = f"Status: {status}"
419
+ elif phase_status:
420
+ header = f"Task: {task_id}\nPhase: {status} ({phase_status})"
413
421
  else:
414
- header = f"Status: {status}" if task_id is None else f"Task: {task_id} ({status})"
422
+ header = f"Task: {task_id} ({status})"
415
423
  return f"<workflow-state>\n{header}\n{body}\n</workflow-state>"
416
424
 
417
425
 
@@ -473,18 +481,18 @@ def main() -> int:
473
481
  platform = _detect_platform(data)
474
482
  task = get_active_task(root, data)
475
483
  if task is None:
476
- # No active task — still emit a breadcrumb nudging AI toward
477
- # trellis-brainstorm + task.py create when user describes real work.
484
+ # No active task — still emit a breadcrumb for classifying new work.
478
485
  no_task_key = resolve_breadcrumb_key("no_task", platform, config)
479
486
  breadcrumb = build_breadcrumb(
480
487
  None, "no_task", templates, breadcrumb_key=no_task_key
481
488
  )
482
489
  else:
483
- task_id, status, source = task
490
+ task_id, status, source, phase_status = task
484
491
  status_key = resolve_breadcrumb_key(status, platform, config)
485
492
  source_for_breadcrumb = None if platform == "codex" else source
486
493
  breadcrumb = build_breadcrumb(
487
- task_id, status, templates, source_for_breadcrumb, breadcrumb_key=status_key
494
+ task_id, status, templates, source_for_breadcrumb, breadcrumb_key=status_key,
495
+ phase_status=phase_status,
488
496
  )
489
497
  if platform == "codex":
490
498
  parts: list[str] = []
@@ -462,12 +462,9 @@ def _get_task_status(trellis_dir: Path, input_data: dict) -> str:
462
462
  return (
463
463
  f"Status: COMPLETED\nTask: {task_title}\n"
464
464
  f"Present: {present_line}\n"
465
- "Next-Action: Run `/trellis:finish-work`. If the working tree is dirty, return to Phase 3.4 first."
465
+ "Next-Action: Task lifecycle is complete. Start another task or end the session; finish-work only records the session journal."
466
466
  )
467
467
 
468
- has_prd = (task_dir / "prd.md").is_file()
469
- has_design = (task_dir / "design.md").is_file()
470
- has_implement_plan = (task_dir / "implement.md").is_file()
471
468
  implement_jsonl = task_dir / "implement.jsonl"
472
469
  check_jsonl = task_dir / "check.jsonl"
473
470
  jsonl_ready = (
@@ -475,31 +472,13 @@ def _get_task_status(trellis_dir: Path, input_data: dict) -> str:
475
472
  and (not check_jsonl.is_file() or _has_curated_jsonl_entry(check_jsonl))
476
473
  )
477
474
 
478
- if task_status == "planning" and not has_prd:
479
- return (
480
- f"Status: PLANNING\nTask: {task_title}\n"
481
- f"Present: {present_line}\n"
482
- "Next-Action: Load `trellis-brainstorm` and write `prd.md`. Stay in planning."
483
- )
484
-
485
475
  if task_status == "planning":
486
- missing_complex = [
487
- name for name, exists in (
488
- ("design.md", has_design),
489
- ("implement.md", has_implement_plan),
490
- )
491
- if not exists
476
+ next_bits = [
477
+ "Follow the current per-turn workflow-state; task lifecycle status and artifact presence do not identify the business phase",
478
+ "If no phase route is initialized, load `trellis-goal-exploration-and-requirements` and confirm the requirements baseline before initializing the route",
492
479
  ]
493
- next_bits: list[str] = []
494
- if missing_complex:
495
- next_bits.append(
496
- "Lightweight task can request start review with PRD-only; "
497
- f"complex task must add {', '.join(missing_complex)} before start"
498
- )
499
- else:
500
- next_bits.append("Planning artifacts are present; ask for review before `task.py start`")
501
480
  if not jsonl_ready:
502
- next_bits.append("curate `implement.jsonl` and `check.jsonl` before sub-agent mode start")
481
+ next_bits.append("curate task context manifests only when a dispatched agent needs them")
503
482
  return (
504
483
  f"Status: PLANNING\nTask: {task_title}\n"
505
484
  f"Present: {present_line}\n"
@@ -509,7 +488,7 @@ def _get_task_status(trellis_dir: Path, input_data: dict) -> str:
509
488
  return (
510
489
  f"Status: {str(task_status).upper()}\nTask: {task_title}\n"
511
490
  f"Present: {present_line}\n"
512
- "Next-Action: Follow the matching per-turn workflow-state. "
491
+ "Next-Action: Follow the matching per-turn workflow-state; task lifecycle status does not identify the business phase. "
513
492
  "Implementation/check context order is jsonl entries -> `prd.md` -> `design.md if present` -> `implement.md if present`."
514
493
  )
515
494
 
@@ -764,14 +743,23 @@ def _extract_range(content: str, start_header: str, end_header: str) -> str:
764
743
  lines = content.splitlines()
765
744
  start: int | None = None
766
745
  end: int = len(lines)
767
- start_match = f"## {start_header}"
768
- end_match = f"## {end_header}"
746
+ start_matches = {f"## {start_header}", "## 阶段索引", "## Phase Index"}
747
+ end_matches = {
748
+ f"## {end_header}",
749
+ f"### {end_header}",
750
+ }
751
+ phase_titles = ("目标探索与需求核对阶段", "Goal Exploration and Requirements Confirmation Phase")
769
752
  for i, line in enumerate(lines):
770
753
  stripped = line.strip()
771
- if start is None and stripped == start_match:
754
+ if start is None and stripped in start_matches:
772
755
  start = i
773
756
  continue
774
- if start is not None and stripped == end_match:
757
+ heading = stripped.lstrip("#").strip()
758
+ is_phase_heading = stripped.startswith(("## ", "### ")) and any(
759
+ heading == title or heading.endswith((f":{title}", f": {title}"))
760
+ for title in phase_titles
761
+ )
762
+ if start is not None and (stripped in end_matches or is_phase_heading):
775
763
  end = i
776
764
  break
777
765
  if start is None:
@@ -829,11 +817,11 @@ def _build_workflow_overview(workflow_path: Path) -> str:
829
817
 
830
818
  out_lines = [
831
819
  "# Development Workflow - Session Summary",
832
- "Full guide: .trellis/workflow.md. Step detail: `python3 ./.trellis/scripts/get_context.py --mode phase --step <X.Y>`.",
820
+ "Full guide: .trellis/workflow.md. Phase detail: load the Skill named in the active phase breadcrumb.",
833
821
  "",
834
822
  ]
835
823
 
836
- phases = _extract_range(content, "Phase Index", "Phase 1: Plan")
824
+ phases = _extract_range(content, "阶段索引", "目标探索与需求核对阶段")
837
825
  if phases:
838
826
  out_lines.append(_strip_breadcrumb_tag_blocks(phases).rstrip())
839
827
 
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: delegated-worktree-primary-agent
3
+ description: Executes an authorized Trellis child task in a Paseo worktree.
4
+ labels: [trellis, delegated-worktree]
5
+ ---
6
+
7
+ # Delegated worktree primary agent
8
+
9
+ Read the repository instructions and applicable specs before editing. The child
10
+ task's `prd.md` is the sole task-specific implementation contract. Work within
11
+ that contract and the supplied worktree and branch, using the smallest complete
12
+ change that satisfies it. Preserve unrelated changes.
13
+
14
+ Do not change Trellis task lifecycle or phase state, accept task results, or
15
+ start another delegated run. Verify the changes with relevant project checks
16
+ and report the files changed, evidence, and any remaining limitation. Stop and
17
+ report if the contract conflicts with repository instructions or requires a
18
+ materially different scope.
@@ -0,0 +1,8 @@
1
+ {
2
+ "profiles": {
3
+ "architecture": { "reasoning_effort": "high" },
4
+ "review": { "reasoning_effort": "high" },
5
+ "research": { "reasoning_effort": "medium" },
6
+ "verification": { "reasoning_effort": "high" }
7
+ }
8
+ }
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: teammate
3
+ description: Provider-neutral Trellis evidence and review role.
4
+ labels: [trellis, teammate]
5
+ ---
6
+
7
+ # Teammate (Teamwork runtime)
8
+
9
+ You are a bounded Trellis teammate assigned one frozen teammate assignment. Produce
10
+ independently reviewable investigation, research, review, verification, or
11
+ evidence. The coordinator owns dispatch, retry, acceptance, and final
12
+ disposition.
13
+
14
+ Read the immutable brief before substantive work. For the assigned teammate
15
+ assignment,
16
+ the paths are:
17
+
18
+ ```text
19
+ .trellis/tasks/<task>/teammates/<batch>/<assignment>/brief.json
20
+ .trellis/tasks/<task>/teammates/<batch>/<assignment>/queue.json
21
+ .trellis/tasks/<task>/teammates/<batch>/<assignment>/attempts/<attempt-id>/claim.json
22
+ .trellis/tasks/<task>/teammates/<batch>/<assignment>/attempts/<attempt-id>/worklog.md
23
+ .trellis/tasks/<task>/teammates/<batch>/<assignment>/attempts/<attempt-id>/report.json
24
+ ```
25
+
26
+ Read the brief and claim, append material progress to the assigned worklog,
27
+ and create exactly one pending report for this attempt using this JSON shape:
28
+
29
+ ```json
30
+ {
31
+ "schema_version": 1,
32
+ "task_id": "<task-id>",
33
+ "batch_id": "<batch-id>",
34
+ "assignment_id": "<assignment-id>",
35
+ "attempt_id": "<attempt-id>",
36
+ "teammate_id": "<teammate-id>",
37
+ "status": "complete",
38
+ "source_digest": "<source_digest from the brief>",
39
+ "evidence": [
40
+ {
41
+ "id": "<evidence-id>",
42
+ "locator": "<path or symbol>",
43
+ "summary": "<finding>"
44
+ }
45
+ ]
46
+ }
47
+ ```
48
+
49
+ Use only the explicit context paths frozen in the brief. Do not read or use
50
+ ambient personal, session, or cross-project memory, including memory tools or
51
+ environment-provided memory. If the host exposes such memory and cannot isolate
52
+ it, stop and report the host-boundary failure through the assigned failure
53
+ protocol.
54
+
55
+ Only submit `status: complete` when every acceptance criterion is met and at
56
+ least one evidence item supports the result. If the work cannot be completed,
57
+ record the blocker in the worklog and end the attempt through its failure
58
+ protocol without creating a misleading completion report. The coordinator
59
+ owns the queue and final disposition. Do not change the brief, task state,
60
+ product source, protected configuration, tests, or Git state. Write only the
61
+ current attempt artifacts. Do not create another teammate, delegate through a
62
+ provider-native mechanism, retry yourself, or claim that a report has been
63
+ accepted.
@@ -18,11 +18,9 @@ max_journal_lines: 2000
18
18
  # Session Auto-Commit
19
19
  #-------------------------------------------------------------------------------
20
20
 
21
- # Auto-commit behavior for session journal + task archive operations.
22
- # - true (default): scripts auto-stage and auto-commit journal / task changes
23
- # after add_session.py / task.py archive runs.
24
- # - false: scripts do not touch git. Files (journal-*.md, task archive moves)
25
- # are still written to disk; you decide whether to git add / commit.
21
+ # Auto-commit behavior for session journal updates.
22
+ # - true (default): add_session.py auto-stages and commits journal changes.
23
+ # - false: the script writes journal files without touching git.
26
24
  #
27
25
  # Use `false` if your project's .gitignore intentionally excludes `.trellis/`
28
26
  # and you want session data kept local-only, or if you prefer to review
@@ -45,12 +43,10 @@ max_journal_lines: 2000
45
43
  # - "echo 'Task created'"
46
44
  # after_start:
47
45
  # - "echo 'Task started'"
48
- # after_replan:
49
- # - "echo 'Task returned to planning'"
50
46
  # after_finish:
51
47
  # - "echo 'Task finished'"
52
- # after_archive:
53
- # - "echo 'Task archived'"
48
+ # after_complete:
49
+ # - "echo 'Task completed'"
54
50
 
55
51
  #-------------------------------------------------------------------------------
56
52
  # Monorepo / Packages
@@ -94,55 +90,50 @@ max_journal_lines: 2000
94
90
  # default_workflow: native
95
91
 
96
92
  #-------------------------------------------------------------------------------
97
- # Channel worker OOM guard
93
+ # Teamwork teammate process guard
98
94
  #-------------------------------------------------------------------------------
99
- # Default safeguards for `trellis channel spawn` workers. The guard runs
100
- # at spawn time (cleans expired idle workers, then enforces the live-worker
101
- # budget) and inside each supervisor (self-terminates a worker that stays
95
+ # Default safeguards for `trellis teamwork spawn` teammates. The guard runs
96
+ # at spawn time (cleans expired idle teammates, then enforces the live-teammate
97
+ # budget) and inside each supervisor (self-terminates a teammate that stays
102
98
  # continuously idle past `idle_timeout`).
103
99
  #
104
- # Precedence: CLI flag > env var (TRELLIS_CHANNEL_WORKER_IDLE_TIMEOUT /
105
- # TRELLIS_CHANNEL_MAX_LIVE_WORKERS) > role config (`channel.subnode` for
106
- # subnodes, `channel.worker_guard` otherwise) > built-in default.
100
+ # Precedence: CLI flag > env var (TRELLIS_TEAMWORK_IDLE_TIMEOUT /
101
+ # TRELLIS_TEAMWORK_MAX_LIVE_TEAMMATES) > this config > built-in default.
107
102
  #
108
- # `idle_timeout: 0` disables idle cleanup (workers can sit idle forever
103
+ # `idle_timeout: 0` disables idle cleanup (teammates can sit idle forever
109
104
  # unless explicitly killed or given `--timeout`).
110
- # `max_live_workers: 0` disables the spawn-time budget check.
105
+ # `max_live_teammates: 0` disables the spawn-time budget check.
111
106
  #
112
107
  # `trusted_context_dirs` extends the `--file`/`--jsonl`/`--agent` containment
113
- # check beyond the worker cwd — useful when `.trellis/tasks` or
108
+ # check beyond the teammate cwd — useful when `.trellis/tasks` or
114
109
  # `.trellis/workspace` is a symlink to an external directory. Realpaths under
115
110
  # any listed dir are accepted in addition to cwd.
116
111
  # `auto_trust_trellis_symlinks: false` disables the narrow auto-trust of
117
112
  # `.trellis/tasks` / `.trellis/workspace` when either is itself a top-level
118
113
  # symlink (auto-trust is on by default).
119
114
  #
120
- channel:
121
- worker_guard:
115
+ teamwork:
116
+ teammate_guard:
122
117
  idle_timeout: 5m
123
- max_live_workers: 6
124
- # Defaults for `trellis channel spawn --agent subnode`. Explicit spawn
125
- # flags still override these values; ordinary workers use worker_guard.
126
- subnode:
127
- idle_timeout: 5m
128
- max_live_workers: 8
129
- timeout: 30m
130
- warn_before: 5m
118
+ max_live_teammates: 6
119
+ non_batch_reserved: 0
131
120
  # trusted_context_dirs:
132
121
  # - /work/user/trellis_workspace
133
122
  # auto_trust_trellis_symlinks: false
123
+ teammate:
124
+ max_concurrency: 1
134
125
 
135
126
  #-------------------------------------------------------------------------------
136
127
  # Codex (dispatch behavior)
137
128
  #-------------------------------------------------------------------------------
138
- # Codex-only knob; other platforms ignore it. The default is "inline": the
139
- # main session performs implementation and checks directly. Set "auto" only
140
- # to opt in to trellis-implement / trellis-check / trellis-research native
141
- # sub-agents. Their task context does not rely on inherited parent transcripts:
142
- # `fork_turns` remains caller-controlled, while Codex's native SubagentStart
143
- # hook injects context when trusted and child-side loading remains the fallback
144
- # when it is unavailable. "sub-agent" remains a backwards-compatible alias
145
- # for "auto". Invalid explicit values safely use inline mode.
129
+ # Codex-only knob; other platforms ignore it. Default ("auto") dispatches
130
+ # trellis-implement / trellis-check / trellis-research sub-agents. This does
131
+ # not rely on inherited parent transcripts: `fork_turns` remains
132
+ # caller-controlled, while Codex's native SubagentStart hook injects task
133
+ # context when trusted and child-side loading remains the fallback when it is
134
+ # unavailable. Set to "inline" only to keep implementation and checks in the
135
+ # main session. "sub-agent" remains a backwards-compatible alias for "auto".
136
+ # Invalid explicit values safely use inline mode.
146
137
  #
147
138
  # In "auto" mode, dispatched sub-agents inherit the main session's model
148
139
  # unless you pin one. To use a cheaper/faster model for implement/check/
@@ -152,7 +143,7 @@ channel:
152
143
  # `trellis update` preserves your edits across regeneration.
153
144
  #
154
145
  # codex:
155
- # dispatch_mode: auto # opt in to native sub-agents; default: "inline"; legacy alias: "sub-agent"
146
+ # dispatch_mode: auto # or "inline"; legacy alias: "sub-agent"
156
147
 
157
148
  #-------------------------------------------------------------------------------
158
149
  # Sub-agent context injection limits
@@ -17,6 +17,7 @@
17
17
 
18
18
  # Task directory runtime files
19
19
  .plan-log
20
+ .task-phase.lock
20
21
 
21
22
  # Atomic update temp files
22
23
  *.tmp
@@ -10,8 +10,8 @@
10
10
  * │ ├── __init__.py
11
11
  * │ ├── common/ # Shared utilities (Python)
12
12
  * │ └── *.py # Main scripts (Python)
13
- * ├── agents/ # Channel runtime agent definitions and assets
14
- * │ └── *.md / *.env # Loaded by the channel runtime
13
+ * ├── agents/ # Teamwork runtime agent definitions
14
+ * │ └── *.md # Loaded by `trellis teamwork spawn --agent <name>`
15
15
  * ├── scripts-shell-archive/ # Archived shell scripts (for reference)
16
16
  * ├── workflow.md # Workflow guide
17
17
  * ├── config.yaml # Trellis configuration
@@ -34,11 +34,10 @@ export declare const commonGit: string;
34
34
  export declare const commonTypes: string;
35
35
  export declare const commonTasks: string;
36
36
  export declare const commonTaskContext: string;
37
- export declare const commonContextProjection: string;
38
37
  export declare const commonTaskStore: string;
38
+ export declare const commonTaskWorkflow: string;
39
+ export declare const commonTaskContinuity: string;
39
40
  export declare const commonSessionContext: string;
40
- export declare const commonContinuationRecord: string;
41
- export declare const commonOwnershipRecord: string;
42
41
  export declare const commonPackagesContext: string;
43
42
  export declare const commonWorkflowPhase: string;
44
43
  export declare const commonWorkflowSelection: string;
@@ -51,22 +50,19 @@ export declare const initDeveloperScript: string;
51
50
  export declare const taskScript: string;
52
51
  export declare const getContextScript: string;
53
52
  export declare const addSessionScript: string;
54
- export declare const subnodeArtifactScript: string;
55
- export declare const workspaceNoteScript: string;
56
53
  export declare const workflowMdTemplate: string;
57
54
  export declare const configYamlTemplate: string;
58
55
  export declare const gitignoreTemplate: string;
59
56
  export declare const gitattributesTemplate: string;
60
- export declare const implementAgentTemplate: string;
61
- export declare const checkAgentTemplate: string;
62
- export declare const subnodeAgentTemplate: string;
63
- export declare const subnodeEnvTemplate: string;
57
+ export declare const teammateAgentTemplate: string;
58
+ export declare const delegatedWorktreeAgentTemplate: string;
59
+ export declare const teammateProfilesTemplate: string;
64
60
  /**
65
61
  * Get all script templates as a map of relative path to content
66
62
  */
67
63
  export declare function getAllScripts(): Map<string, string>;
68
64
  /**
69
- * Get all channel runtime agent assets as a map of relative path
65
+ * Get project agent role assets as a map of relative path
70
66
  * (under `.trellis/agents/`) to content.
71
67
  *
72
68
  * Consumed by `trellis init` (to dispatch on first install) and by
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,YAAY,QAA2C,CAAC;AACrE,eAAO,MAAM,QAAQ,QAAuC,CAAC;AAC7D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,iBAAiB,QAAiD,CAAC;AAChF,eAAO,MAAM,uBAAuB,QAEnC,CAAC;AACF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,uBAAuB,QAEnC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAG9E,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAG7E,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAC/D,eAAO,MAAM,qBAAqB,QAAoC,CAAC;AAMvE,eAAO,MAAM,sBAAsB,QAAsC,CAAC;AAC1E,eAAO,MAAM,kBAAkB,QAAkC,CAAC;AAClE,eAAO,MAAM,oBAAoB,QAAoC,CAAC;AACtE,eAAO,MAAM,kBAAkB,QAAqC,CAAC;AAErE;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA6CnD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAOlD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/trellis/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAcH,eAAO,MAAM,WAAW,QAAsC,CAAC;AAG/D,eAAO,MAAM,UAAU,QAA6C,CAAC;AACrE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,eAAe,QAA8C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,YAAY,QAA2C,CAAC;AACrE,eAAO,MAAM,QAAQ,QAAuC,CAAC;AAC7D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,SAAS,QAAwC,CAAC;AAC/D,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,WAAW,QAA0C,CAAC;AACnE,eAAO,MAAM,iBAAiB,QAAiD,CAAC;AAChF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,kBAAkB,QAE9B,CAAC;AACF,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,uBAAuB,QAEnC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAE/B,CAAC;AACF,eAAO,MAAM,eAAe,QAA+C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAC9E,eAAO,MAAM,gBAAgB,QAAgD,CAAC;AAG9E,eAAO,MAAM,kBAAkB,QAA2C,CAAC;AAC3E,eAAO,MAAM,mBAAmB,QAA4C,CAAC;AAC7E,eAAO,MAAM,UAAU,QAAkC,CAAC;AAC1D,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AACvE,eAAO,MAAM,gBAAgB,QAAyC,CAAC;AAGvE,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAC9D,eAAO,MAAM,iBAAiB,QAAgC,CAAC;AAC/D,eAAO,MAAM,qBAAqB,QAAoC,CAAC;AAGvE,eAAO,MAAM,qBAAqB,QAAqC,CAAC;AACxE,eAAO,MAAM,8BAA8B,QAE1C,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA0CnD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CASlD"}