@pennixrv/trellis 0.7.0-beta.8 → 0.7.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 (484) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +14 -26
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/ablate.js +1 -1
  6. package/dist/commands/ablate.js.map +1 -1
  7. package/dist/commands/init.d.ts.map +1 -1
  8. package/dist/commands/init.js +30 -56
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/task-progress.d.ts +2 -0
  11. package/dist/commands/task-progress.d.ts.map +1 -1
  12. package/dist/commands/task-progress.js +37 -30
  13. package/dist/commands/task-progress.js.map +1 -1
  14. package/dist/commands/{channel → teamwork}/adapters/claude.d.ts +3 -3
  15. package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -0
  16. package/dist/commands/{channel → teamwork}/adapters/claude.js +3 -3
  17. package/dist/commands/teamwork/adapters/claude.js.map +1 -0
  18. package/dist/commands/{channel → teamwork}/adapters/codex.d.ts +1 -15
  19. package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -0
  20. package/dist/commands/{channel → teamwork}/adapters/codex.js +5 -42
  21. package/dist/commands/teamwork/adapters/codex.js.map +1 -0
  22. package/dist/commands/{channel → teamwork}/adapters/index.d.ts +6 -6
  23. package/dist/commands/teamwork/adapters/index.d.ts.map +1 -0
  24. package/dist/commands/{channel → teamwork}/adapters/index.js +16 -52
  25. package/dist/commands/teamwork/adapters/index.js.map +1 -0
  26. package/dist/commands/{channel → teamwork}/adapters/types.d.ts +2 -2
  27. package/dist/commands/teamwork/adapters/types.d.ts.map +1 -0
  28. package/dist/commands/teamwork/adapters/types.js.map +1 -0
  29. package/dist/commands/{channel → teamwork}/agent-loader.d.ts +2 -4
  30. package/dist/commands/teamwork/agent-loader.d.ts.map +1 -0
  31. package/dist/commands/{channel → teamwork}/agent-loader.js +4 -35
  32. package/dist/commands/teamwork/agent-loader.js.map +1 -0
  33. package/dist/commands/teamwork/artifact.d.ts +177 -0
  34. package/dist/commands/teamwork/artifact.d.ts.map +1 -0
  35. package/dist/commands/teamwork/artifact.js +908 -0
  36. package/dist/commands/teamwork/artifact.js.map +1 -0
  37. package/dist/commands/{channel → teamwork}/context-loader.d.ts +1 -1
  38. package/dist/commands/teamwork/context-loader.d.ts.map +1 -0
  39. package/dist/commands/{channel → teamwork}/context-loader.js +12 -12
  40. package/dist/commands/teamwork/context-loader.js.map +1 -0
  41. package/dist/commands/{channel → teamwork}/context-trust.d.ts +6 -6
  42. package/dist/commands/teamwork/context-trust.d.ts.map +1 -0
  43. package/dist/commands/{channel → teamwork}/context-trust.js +16 -16
  44. package/dist/commands/teamwork/context-trust.js.map +1 -0
  45. package/dist/commands/teamwork/context.d.ts +16 -0
  46. package/dist/commands/teamwork/context.d.ts.map +1 -0
  47. package/dist/commands/{channel → teamwork}/context.js +17 -17
  48. package/dist/commands/teamwork/context.js.map +1 -0
  49. package/dist/commands/teamwork/coordinator.d.ts +89 -0
  50. package/dist/commands/teamwork/coordinator.d.ts.map +1 -0
  51. package/dist/commands/teamwork/coordinator.js +1198 -0
  52. package/dist/commands/teamwork/coordinator.js.map +1 -0
  53. package/dist/commands/teamwork/create.d.ts +23 -0
  54. package/dist/commands/teamwork/create.d.ts.map +1 -0
  55. package/dist/commands/teamwork/create.js +39 -0
  56. package/dist/commands/teamwork/create.js.map +1 -0
  57. package/dist/commands/{channel → teamwork}/dev-parse-trace.d.ts +1 -1
  58. package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -0
  59. package/dist/commands/{channel → teamwork}/dev-parse-trace.js +1 -1
  60. package/dist/commands/teamwork/dev-parse-trace.js.map +1 -0
  61. package/dist/commands/{channel → teamwork}/guard.d.ts +27 -46
  62. package/dist/commands/teamwork/guard.d.ts.map +1 -0
  63. package/dist/commands/{channel → teamwork}/guard.js +54 -156
  64. package/dist/commands/teamwork/guard.js.map +1 -0
  65. package/dist/commands/teamwork/index.d.ts +3 -0
  66. package/dist/commands/teamwork/index.d.ts.map +1 -0
  67. package/dist/commands/{channel → teamwork}/index.js +135 -165
  68. package/dist/commands/teamwork/index.js.map +1 -0
  69. package/dist/commands/{channel → teamwork}/interrupt.d.ts +1 -1
  70. package/dist/commands/teamwork/interrupt.d.ts.map +1 -0
  71. package/dist/commands/teamwork/interrupt.js +22 -0
  72. package/dist/commands/teamwork/interrupt.js.map +1 -0
  73. package/dist/commands/teamwork/kill.d.ts +7 -0
  74. package/dist/commands/teamwork/kill.d.ts.map +1 -0
  75. package/dist/commands/{channel → teamwork}/kill.js +21 -21
  76. package/dist/commands/teamwork/kill.js.map +1 -0
  77. package/dist/commands/teamwork/list.d.ts +17 -0
  78. package/dist/commands/teamwork/list.d.ts.map +1 -0
  79. package/dist/commands/{channel → teamwork}/list.js +18 -27
  80. package/dist/commands/teamwork/list.js.map +1 -0
  81. package/dist/commands/{channel → teamwork}/messages.d.ts +1 -1
  82. package/dist/commands/teamwork/messages.d.ts.map +1 -0
  83. package/dist/commands/{channel → teamwork}/messages.js +18 -18
  84. package/dist/commands/teamwork/messages.js.map +1 -0
  85. package/dist/commands/teamwork/profiles.d.ts +25 -0
  86. package/dist/commands/teamwork/profiles.d.ts.map +1 -0
  87. package/dist/commands/teamwork/profiles.js +125 -0
  88. package/dist/commands/teamwork/profiles.js.map +1 -0
  89. package/dist/commands/teamwork/rm.d.ts +27 -0
  90. package/dist/commands/teamwork/rm.d.ts.map +1 -0
  91. package/dist/commands/{channel → teamwork}/rm.js +21 -22
  92. package/dist/commands/teamwork/rm.js.map +1 -0
  93. package/dist/commands/teamwork/run.d.ts +29 -0
  94. package/dist/commands/{channel → teamwork}/run.d.ts.map +1 -1
  95. package/dist/commands/teamwork/run.js +129 -0
  96. package/dist/commands/teamwork/run.js.map +1 -0
  97. package/dist/commands/{channel → teamwork}/send.d.ts +1 -1
  98. package/dist/commands/teamwork/send.d.ts.map +1 -0
  99. package/dist/commands/{channel → teamwork}/send.js +7 -7
  100. package/dist/commands/teamwork/send.js.map +1 -0
  101. package/dist/commands/{channel → teamwork}/spawn.d.ts +8 -12
  102. package/dist/commands/teamwork/spawn.d.ts.map +1 -0
  103. package/dist/commands/{channel → teamwork}/spawn.js +51 -112
  104. package/dist/commands/teamwork/spawn.js.map +1 -0
  105. package/dist/commands/teamwork/store/events.d.ts +22 -0
  106. package/dist/commands/teamwork/store/events.d.ts.map +1 -0
  107. package/dist/commands/{channel → teamwork}/store/events.js +8 -8
  108. package/dist/commands/teamwork/store/events.js.map +1 -0
  109. package/dist/commands/teamwork/store/filter.d.ts +3 -0
  110. package/dist/commands/teamwork/store/filter.d.ts.map +1 -0
  111. package/dist/commands/teamwork/store/filter.js +2 -0
  112. package/dist/commands/teamwork/store/filter.js.map +1 -0
  113. package/dist/commands/{channel → teamwork}/store/lock.d.ts +1 -1
  114. package/dist/commands/teamwork/store/lock.d.ts.map +1 -0
  115. package/dist/commands/{channel → teamwork}/store/lock.js +2 -2
  116. package/dist/commands/teamwork/store/lock.js.map +1 -0
  117. package/dist/commands/{channel → teamwork}/store/paths.d.ts +18 -32
  118. package/dist/commands/teamwork/store/paths.d.ts.map +1 -0
  119. package/dist/commands/{channel → teamwork}/store/paths.js +42 -109
  120. package/dist/commands/teamwork/store/paths.js.map +1 -0
  121. package/dist/commands/teamwork/store/schema.d.ts +18 -0
  122. package/dist/commands/teamwork/store/schema.d.ts.map +1 -0
  123. package/dist/commands/teamwork/store/schema.js +23 -0
  124. package/dist/commands/teamwork/store/schema.js.map +1 -0
  125. package/dist/commands/{channel → teamwork}/store/thread-state.d.ts +3 -3
  126. package/dist/commands/teamwork/store/thread-state.d.ts.map +1 -0
  127. package/dist/commands/{channel → teamwork}/store/thread-state.js +1 -1
  128. package/dist/commands/teamwork/store/thread-state.js.map +1 -0
  129. package/dist/commands/teamwork/store/watch.d.ts +19 -0
  130. package/dist/commands/teamwork/store/watch.d.ts.map +1 -0
  131. package/dist/commands/{channel → teamwork}/store/watch.js +8 -8
  132. package/dist/commands/teamwork/store/watch.js.map +1 -0
  133. package/dist/commands/teamwork/supervisor/idle.d.ts.map +1 -0
  134. package/dist/commands/teamwork/supervisor/idle.js.map +1 -0
  135. package/dist/commands/{channel → teamwork}/supervisor/inbox.d.ts +2 -2
  136. package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -0
  137. package/dist/commands/{channel → teamwork}/supervisor/inbox.js +14 -14
  138. package/dist/commands/teamwork/supervisor/inbox.js.map +1 -0
  139. package/dist/commands/{channel → teamwork}/supervisor/shutdown.d.ts +3 -6
  140. package/dist/commands/teamwork/supervisor/shutdown.d.ts.map +1 -0
  141. package/dist/commands/{channel → teamwork}/supervisor/shutdown.js +7 -17
  142. package/dist/commands/teamwork/supervisor/shutdown.js.map +1 -0
  143. package/dist/commands/{channel → teamwork}/supervisor/stdout.d.ts +3 -5
  144. package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -0
  145. package/dist/commands/{channel → teamwork}/supervisor/stdout.js +12 -23
  146. package/dist/commands/teamwork/supervisor/stdout.js.map +1 -0
  147. package/dist/commands/teamwork/supervisor/turns.d.ts.map +1 -0
  148. package/dist/commands/teamwork/supervisor/turns.js.map +1 -0
  149. package/dist/commands/{channel → teamwork}/supervisor/warning.d.ts +5 -5
  150. package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -0
  151. package/dist/commands/{channel → teamwork}/supervisor/warning.js +6 -6
  152. package/dist/commands/teamwork/supervisor/warning.js.map +1 -0
  153. package/dist/commands/{channel → teamwork}/supervisor.d.ts +21 -21
  154. package/dist/commands/teamwork/supervisor.d.ts.map +1 -0
  155. package/dist/commands/{channel → teamwork}/supervisor.js +53 -63
  156. package/dist/commands/teamwork/supervisor.js.map +1 -0
  157. package/dist/commands/teamwork/teammate-adapters.d.ts +31 -0
  158. package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -0
  159. package/dist/commands/teamwork/teammate-adapters.js +96 -0
  160. package/dist/commands/teamwork/teammate-adapters.js.map +1 -0
  161. package/dist/commands/teamwork/teammate-config.d.ts +19 -0
  162. package/dist/commands/teamwork/teammate-config.d.ts.map +1 -0
  163. package/dist/commands/teamwork/teammate-config.js +97 -0
  164. package/dist/commands/teamwork/teammate-config.js.map +1 -0
  165. package/dist/commands/teamwork/teammate-launch.d.ts +58 -0
  166. package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -0
  167. package/dist/commands/teamwork/teammate-launch.js +125 -0
  168. package/dist/commands/teamwork/teammate-launch.js.map +1 -0
  169. package/dist/commands/teamwork/text-body.d.ts +13 -0
  170. package/dist/commands/teamwork/text-body.d.ts.map +1 -0
  171. package/dist/commands/{channel → teamwork}/text-body.js +3 -3
  172. package/dist/commands/teamwork/text-body.js.map +1 -0
  173. package/dist/commands/teamwork/threads.d.ts +35 -0
  174. package/dist/commands/teamwork/threads.d.ts.map +1 -0
  175. package/dist/commands/{channel → teamwork}/threads.js +19 -19
  176. package/dist/commands/teamwork/threads.js.map +1 -0
  177. package/dist/commands/teamwork/title.d.ts +12 -0
  178. package/dist/commands/teamwork/title.d.ts.map +1 -0
  179. package/dist/commands/teamwork/title.js +24 -0
  180. package/dist/commands/teamwork/title.js.map +1 -0
  181. package/dist/commands/{channel → teamwork}/wait.d.ts +1 -5
  182. package/dist/commands/teamwork/wait.d.ts.map +1 -0
  183. package/dist/commands/{channel → teamwork}/wait.js +8 -21
  184. package/dist/commands/teamwork/wait.js.map +1 -0
  185. package/dist/commands/update.d.ts.map +1 -1
  186. package/dist/commands/update.js +48 -89
  187. package/dist/commands/update.js.map +1 -1
  188. package/dist/commands/workflow.d.ts +1 -1
  189. package/dist/commands/workflow.d.ts.map +1 -1
  190. package/dist/commands/workflow.js +9 -10
  191. package/dist/commands/workflow.js.map +1 -1
  192. package/dist/configurators/claude.d.ts +0 -17
  193. package/dist/configurators/claude.d.ts.map +1 -1
  194. package/dist/configurators/claude.js +2 -61
  195. package/dist/configurators/claude.js.map +1 -1
  196. package/dist/configurators/shared.d.ts.map +1 -1
  197. package/dist/configurators/shared.js +2 -2
  198. package/dist/configurators/shared.js.map +1 -1
  199. package/dist/configurators/snow.js +1 -1
  200. package/dist/configurators/snow.js.map +1 -1
  201. package/dist/configurators/workflow.d.ts +1 -1
  202. package/dist/configurators/workflow.js +5 -5
  203. package/dist/configurators/workflow.js.map +1 -1
  204. package/dist/constants/paths.d.ts +1 -1
  205. package/dist/constants/paths.d.ts.map +1 -1
  206. package/dist/constants/paths.js +1 -1
  207. package/dist/constants/paths.js.map +1 -1
  208. package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
  209. package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
  210. package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
  211. package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
  212. package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
  213. package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
  214. package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
  215. package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
  216. package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
  217. package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
  218. package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
  219. package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
  220. package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
  221. package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
  222. package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
  223. package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
  224. package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
  225. package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
  226. package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
  227. package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
  228. package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
  229. package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
  230. package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
  231. package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
  232. package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
  233. package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
  234. package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
  235. package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
  236. package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
  237. package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
  238. package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
  239. package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
  240. package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
  241. package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
  242. package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
  243. package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
  244. package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
  245. package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
  246. package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
  247. package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
  248. package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
  249. package/dist/migrations/manifests/0.7.0-beta.51.json +9 -0
  250. package/dist/migrations/manifests/0.7.0-beta.52.json +9 -0
  251. package/dist/migrations/manifests/0.7.0-beta.53.json +27 -0
  252. package/dist/migrations/manifests/0.7.0-beta.54.json +8 -0
  253. package/dist/migrations/manifests/0.7.0-beta.9.json +9 -0
  254. package/dist/migrations/manifests/0.7.1.json +9 -0
  255. package/dist/templates/claude/hooks/statusline.py +0 -7
  256. package/dist/templates/codex/hooks/session-start.py +31 -38
  257. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
  258. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
  259. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
  260. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
  261. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
  262. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
  263. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
  264. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
  265. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
  266. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  267. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
  268. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
  269. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  270. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
  271. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
  272. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
  273. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  274. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
  275. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
  276. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
  277. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  278. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
  279. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
  280. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
  281. package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
  282. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
  283. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
  284. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
  285. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
  286. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
  287. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
  288. package/dist/templates/common/commands/continue.md +9 -49
  289. package/dist/templates/common/commands/finish-work.md +10 -58
  290. package/dist/templates/common/commands/start.md +19 -49
  291. package/dist/templates/common/skills/brainstorm.md +11 -191
  292. package/dist/templates/copilot/hooks/session-start.py +30 -26
  293. package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -150
  294. package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
  295. package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
  296. package/dist/templates/copilot/prompts/start.prompt.md +12 -10
  297. package/dist/templates/dsh/DSH.md +2 -2
  298. package/dist/templates/kiro/agents/trellis.json +2 -2
  299. package/dist/templates/markdown/agents.md +14 -3
  300. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
  301. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
  302. package/dist/templates/markdown/workspace-index.md +0 -1
  303. package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
  304. package/dist/templates/opencode/lib/session-utils.js +20 -25
  305. package/dist/templates/opencode/lib/trellis-context.js +4 -76
  306. package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
  307. package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
  308. package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
  309. package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
  310. package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
  311. package/dist/templates/shared-hooks/session-start.py +21 -33
  312. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
  313. package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
  314. package/dist/templates/trellis/agents/teammate.md +63 -0
  315. package/dist/templates/trellis/config.yaml +29 -38
  316. package/dist/templates/trellis/gitignore.txt +1 -0
  317. package/dist/templates/trellis/index.d.ts +8 -12
  318. package/dist/templates/trellis/index.d.ts.map +1 -1
  319. package/dist/templates/trellis/index.js +14 -25
  320. package/dist/templates/trellis/index.js.map +1 -1
  321. package/dist/templates/trellis/scripts/add_session.py +1 -1
  322. package/dist/templates/trellis/scripts/common/__init__.py +0 -1
  323. package/dist/templates/trellis/scripts/common/active_task.py +136 -100
  324. package/dist/templates/trellis/scripts/common/config.py +7 -9
  325. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  326. package/dist/templates/trellis/scripts/common/io.py +19 -0
  327. package/dist/templates/trellis/scripts/common/paths.py +0 -1
  328. package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
  329. package/dist/templates/trellis/scripts/common/session_context.py +1 -8
  330. package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
  331. package/dist/templates/trellis/scripts/common/task_context.py +152 -59
  332. package/dist/templates/trellis/scripts/common/task_continuity.py +563 -0
  333. package/dist/templates/trellis/scripts/common/task_store.py +70 -548
  334. package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
  335. package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
  336. package/dist/templates/trellis/scripts/common/tasks.py +5 -8
  337. package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
  338. package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
  339. package/dist/templates/trellis/scripts/task.py +114 -377
  340. package/dist/templates/trellis/workflow.md +111 -699
  341. package/dist/utils/agent-refs.d.ts +5 -5
  342. package/dist/utils/agent-refs.js +6 -6
  343. package/dist/utils/file-writer.d.ts +3 -2
  344. package/dist/utils/file-writer.d.ts.map +1 -1
  345. package/dist/utils/file-writer.js +3 -2
  346. package/dist/utils/file-writer.js.map +1 -1
  347. package/dist/utils/managed-paths.d.ts +0 -7
  348. package/dist/utils/managed-paths.d.ts.map +1 -1
  349. package/dist/utils/managed-paths.js +0 -40
  350. package/dist/utils/managed-paths.js.map +1 -1
  351. package/dist/utils/manifest-prune.d.ts.map +1 -1
  352. package/dist/utils/manifest-prune.js +2 -11
  353. package/dist/utils/manifest-prune.js.map +1 -1
  354. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  355. package/dist/utils/uninstall-scrubbers.js +3 -3
  356. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  357. package/dist/utils/workflow-resolver.d.ts +10 -16
  358. package/dist/utils/workflow-resolver.d.ts.map +1 -1
  359. package/dist/utils/workflow-resolver.js +25 -36
  360. package/dist/utils/workflow-resolver.js.map +1 -1
  361. package/package.json +2 -2
  362. package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
  363. package/dist/commands/channel/adapters/claude.js.map +0 -1
  364. package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
  365. package/dist/commands/channel/adapters/codex.js.map +0 -1
  366. package/dist/commands/channel/adapters/index.d.ts.map +0 -1
  367. package/dist/commands/channel/adapters/index.js.map +0 -1
  368. package/dist/commands/channel/adapters/types.d.ts.map +0 -1
  369. package/dist/commands/channel/adapters/types.js.map +0 -1
  370. package/dist/commands/channel/agent-loader.d.ts.map +0 -1
  371. package/dist/commands/channel/agent-loader.js.map +0 -1
  372. package/dist/commands/channel/context-loader.d.ts.map +0 -1
  373. package/dist/commands/channel/context-loader.js.map +0 -1
  374. package/dist/commands/channel/context-trust.d.ts.map +0 -1
  375. package/dist/commands/channel/context-trust.js.map +0 -1
  376. package/dist/commands/channel/context.d.ts +0 -16
  377. package/dist/commands/channel/context.d.ts.map +0 -1
  378. package/dist/commands/channel/context.js.map +0 -1
  379. package/dist/commands/channel/create.d.ts +0 -29
  380. package/dist/commands/channel/create.d.ts.map +0 -1
  381. package/dist/commands/channel/create.js +0 -47
  382. package/dist/commands/channel/create.js.map +0 -1
  383. package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
  384. package/dist/commands/channel/dev-parse-trace.js.map +0 -1
  385. package/dist/commands/channel/guard.d.ts.map +0 -1
  386. package/dist/commands/channel/guard.js.map +0 -1
  387. package/dist/commands/channel/index.d.ts +0 -3
  388. package/dist/commands/channel/index.d.ts.map +0 -1
  389. package/dist/commands/channel/index.js.map +0 -1
  390. package/dist/commands/channel/interrupt.d.ts.map +0 -1
  391. package/dist/commands/channel/interrupt.js +0 -22
  392. package/dist/commands/channel/interrupt.js.map +0 -1
  393. package/dist/commands/channel/kill.d.ts +0 -7
  394. package/dist/commands/channel/kill.d.ts.map +0 -1
  395. package/dist/commands/channel/kill.js.map +0 -1
  396. package/dist/commands/channel/list.d.ts +0 -18
  397. package/dist/commands/channel/list.d.ts.map +0 -1
  398. package/dist/commands/channel/list.js.map +0 -1
  399. package/dist/commands/channel/messages.d.ts.map +0 -1
  400. package/dist/commands/channel/messages.js.map +0 -1
  401. package/dist/commands/channel/rm.d.ts +0 -27
  402. package/dist/commands/channel/rm.d.ts.map +0 -1
  403. package/dist/commands/channel/rm.js.map +0 -1
  404. package/dist/commands/channel/run.d.ts +0 -32
  405. package/dist/commands/channel/run.js +0 -141
  406. package/dist/commands/channel/run.js.map +0 -1
  407. package/dist/commands/channel/send.d.ts.map +0 -1
  408. package/dist/commands/channel/send.js.map +0 -1
  409. package/dist/commands/channel/spawn.d.ts.map +0 -1
  410. package/dist/commands/channel/spawn.js.map +0 -1
  411. package/dist/commands/channel/store/events.d.ts +0 -22
  412. package/dist/commands/channel/store/events.d.ts.map +0 -1
  413. package/dist/commands/channel/store/events.js.map +0 -1
  414. package/dist/commands/channel/store/filter.d.ts +0 -3
  415. package/dist/commands/channel/store/filter.d.ts.map +0 -1
  416. package/dist/commands/channel/store/filter.js +0 -2
  417. package/dist/commands/channel/store/filter.js.map +0 -1
  418. package/dist/commands/channel/store/lock.d.ts.map +0 -1
  419. package/dist/commands/channel/store/lock.js.map +0 -1
  420. package/dist/commands/channel/store/paths.d.ts.map +0 -1
  421. package/dist/commands/channel/store/paths.js.map +0 -1
  422. package/dist/commands/channel/store/schema.d.ts +0 -27
  423. package/dist/commands/channel/store/schema.d.ts.map +0 -1
  424. package/dist/commands/channel/store/schema.js +0 -34
  425. package/dist/commands/channel/store/schema.js.map +0 -1
  426. package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
  427. package/dist/commands/channel/store/thread-state.js.map +0 -1
  428. package/dist/commands/channel/store/watch.d.ts +0 -19
  429. package/dist/commands/channel/store/watch.d.ts.map +0 -1
  430. package/dist/commands/channel/store/watch.js.map +0 -1
  431. package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
  432. package/dist/commands/channel/supervisor/idle.js.map +0 -1
  433. package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
  434. package/dist/commands/channel/supervisor/inbox.js.map +0 -1
  435. package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
  436. package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
  437. package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
  438. package/dist/commands/channel/supervisor/stdout.js.map +0 -1
  439. package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
  440. package/dist/commands/channel/supervisor/turns.js.map +0 -1
  441. package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
  442. package/dist/commands/channel/supervisor/warning.js.map +0 -1
  443. package/dist/commands/channel/supervisor.d.ts.map +0 -1
  444. package/dist/commands/channel/supervisor.js.map +0 -1
  445. package/dist/commands/channel/text-body.d.ts +0 -13
  446. package/dist/commands/channel/text-body.d.ts.map +0 -1
  447. package/dist/commands/channel/text-body.js.map +0 -1
  448. package/dist/commands/channel/threads.d.ts +0 -39
  449. package/dist/commands/channel/threads.d.ts.map +0 -1
  450. package/dist/commands/channel/threads.js.map +0 -1
  451. package/dist/commands/channel/title.d.ts +0 -12
  452. package/dist/commands/channel/title.d.ts.map +0 -1
  453. package/dist/commands/channel/title.js +0 -24
  454. package/dist/commands/channel/title.js.map +0 -1
  455. package/dist/commands/channel/wait.d.ts.map +0 -1
  456. package/dist/commands/channel/wait.js.map +0 -1
  457. package/dist/commands/channel/workers.d.ts +0 -9
  458. package/dist/commands/channel/workers.d.ts.map +0 -1
  459. package/dist/commands/channel/workers.js +0 -31
  460. package/dist/commands/channel/workers.js.map +0 -1
  461. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
  462. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
  463. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
  464. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
  465. package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -193
  466. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
  467. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
  468. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
  469. package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
  470. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  471. package/dist/templates/trellis/agents/check.md +0 -70
  472. package/dist/templates/trellis/agents/implement.md +0 -71
  473. package/dist/templates/trellis/agents/subnode.env +0 -4
  474. package/dist/templates/trellis/agents/subnode.md +0 -69
  475. package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
  476. package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
  477. package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
  478. package/dist/templates/trellis/scripts/subnode_artifact.py +0 -597
  479. package/dist/templates/trellis/scripts/workspace_note.py +0 -126
  480. /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
  481. /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
  482. /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
  483. /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
  484. /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
@@ -1,156 +1,13 @@
1
1
  ---
2
- description: "Guide requirements discovery for a Trellis task after task-creation consent."
2
+ description: "Route a Trellis task through its current phase."
3
3
  ---
4
4
 
5
- # Trellis Brainstorm
5
+ # Requirements and phase routing
6
6
 
7
- ## Non-Negotiable Planning Contract
7
+ Use `.trellis/workflow.md` and the current workflow-state breadcrumb as the authority for the task's phase. Task lifecycle status and artifact presence do not identify the business phase.
8
8
 
9
- A request to build, implement, fix, refactor, or "go ahead" is not approval to leave planning. Task-creation consent is also not implementation approval.
9
+ - No active task: if the request needs a Trellis task, obtain task-creation consent, create it, and load `trellis-goal-exploration-and-requirements`. Handle eligible low-risk, authorized work through the taskless route.
10
+ - Task without an initialized phase route: use `trellis-goal-exploration-and-requirements` to align the requirements; initialize the applicable ordered route only after the user confirms the current requirements baseline.
11
+ - Task with an active phase: load the Skill matching that phase. This shortcut must not reset or bypass the current phase.
10
12
 
11
- For every non-trivial task, the user must respond at least once after the initial request before implementation begins. If no clarification is needed, that response must approve the final planning summary described below.
12
-
13
- While any user-owned product, scope, UX, compatibility, risk, or acceptance decision remains unresolved, keep the task in planning. First inventory evidence and decision dependencies. If at least two independent material decisions remain and `pennix-decision-gates` is available, delegate one bounded batch of up to three frontier questions; otherwise ask the single highest-value question. Do not edit product code, dispatch implementation, or run `task.py start` until the decision chain is sealed.
14
-
15
- ## Non-Negotiable Evidence Rule
16
-
17
- If a question can be answered by exploring the codebase, explore the codebase instead.
18
-
19
- This is mandatory. Before asking the user a question, first check whether the answer is already available in code, tests, configs, docs, existing specs, or task history.
20
-
21
- Do not ask the user to confirm facts that the repository can answer. Ask only for product intent, preference, scope, risk tolerance, acceptance behavior, or decisions that remain ambiguous after inspection.
22
-
23
- Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
24
-
25
- ---
26
-
27
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
28
-
29
- ## Preconditions
30
-
31
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
32
-
33
- If no task exists yet, create one:
34
-
35
- ```bash
36
- TASK_DIR=$({{PYTHON_CMD}} ./.trellis/scripts/task.py create "<short task title>" --description "<one-line summary>" --slug <slug>)
37
- ```
38
-
39
- Use a concise title from the user's request. Both the title and `--description` must be non-empty — `create` rejects blanks, and a record with either one empty is refused at archive. Use a slug without a date prefix. `task.py create` adds the `MM-DD-` directory prefix automatically.
40
-
41
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
42
-
43
- ## Planning Flow
44
-
45
- 1. Capture the user's request and initial known facts in `prd.md`.
46
- 2. Inspect available evidence before asking questions:
47
- - code, tests, fixtures, and configs
48
- - README files, docs, existing specs, and domain notes
49
- - related Trellis tasks, research files, and session history when present
50
- 3. Separate what you found into:
51
- - confirmed facts
52
- - product intent still needed from the user
53
- - scope or risk decisions still needed from the user
54
- - likely out-of-scope items
55
- 4. If user-owned decisions remain, calculate the independent frontier. Use `pennix-decision-gates` for a bounded batch when two or more independent material decisions are ready; otherwise ask the single highest-value question. Include recommendation and trade-off, then stop the turn for native input.
56
- 5. After each answer batch, update `prd.md`, record the selected decisions, recheck evidence and conflicts, and repeat from step 2. Do not create a second Trellis lifecycle for the same decision chain.
57
- 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
58
- 7. Run the requirement convergence gate, then the PRD convergence pass.
59
- 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
60
- 9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If implementation reveals a material unresolved decision, record `decision-needed`, run `task.py replan <task> "<reason>"`, and return through this planning flow; do not open a popup during implementation.
61
-
62
- Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
63
-
64
- ## Question Rules
65
-
66
- Ask one bounded batch per message: include up to three independent material frontier questions. Ask exactly one question only when it is the sole remaining material decision or later decisions depend on its answer.
67
-
68
- Each question must include:
69
-
70
- - the decision needed
71
- - why the answer matters
72
- - your recommended answer
73
- - the trade-off if the user chooses differently
74
-
75
- Do not ask process questions such as whether to search, inspect files, or continue brainstorming. Do the evidence work directly. Ask the user only when the remaining issue is a product decision, preference, scope boundary, or risk tolerance choice.
76
-
77
- Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
78
-
79
- Do not manufacture clarification questions when the request and repository evidence already resolve every decision. In that case, proceed directly to the final planning summary, which still requires a subsequent explicit approval.
80
-
81
- The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
82
-
83
- ## Requirement Convergence Gate
84
-
85
- Before final review, verify all of the following:
86
-
87
- - the user outcome and product value are explicit
88
- - in-scope and out-of-scope behavior are explicit
89
- - acceptance criteria describe observable outcomes
90
- - user-owned product, scope, UX, compatibility, and risk decisions are resolved
91
- - blocking open questions are empty
92
- - technical unknowns are researched or explicitly deferred without changing MVP behavior
93
-
94
- Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
95
-
96
- The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
97
-
98
- ## Artifact Rules
99
-
100
- `prd.md` records requirements and acceptance:
101
-
102
- - goal and user value
103
- - confirmed facts
104
- - requirements
105
- - acceptance criteria
106
- - out of scope
107
- - open questions that still block planning
108
-
109
- `design.md` records technical design for complex tasks:
110
-
111
- - architecture and boundaries
112
- - data flow and contracts
113
- - compatibility and migration notes
114
- - important trade-offs
115
- - operational or rollback considerations
116
-
117
- `implement.md` records execution planning for complex tasks:
118
-
119
- - ordered implementation checklist
120
- - validation commands
121
- - risky files or rollback points
122
- - follow-up checks before `task.py start`
123
-
124
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start`.
125
-
126
- `implement.md` is not a replacement for `implement.jsonl`. On sub-agent-dispatch workflows, `implement.jsonl` and `check.jsonl` must each contain at least one real spec/research entry before `task.py start`; an empty manifest, or one holding only a legacy `_example` placeholder row, does not count. Inline workflows skip this JSONL gate because Phase 2 loads context through `trellis-before-dev`.
127
-
128
- ## PRD Convergence Pass
129
-
130
- Before declaring planning ready or running `task.py start`, rewrite `prd.md` once against the final structure described in the artifact rules above. This is not optional cleanup; it is the final planning gate.
131
-
132
- The pass must be lossless:
133
-
134
- - Collapse repeated facts into one authoritative section.
135
- - Fold temporary brainstorm sections such as `What I already know`, `Assumptions`, and resolved `Open Questions` into Goal, Background, Requirements, Technical Notes, or Acceptance Criteria.
136
- - Remove resolved open questions instead of leaving empty or already-answered sections.
137
- - Merge parallel bug and requirement lists when they describe the same work; keep each defect's severity, evidence, and file:line anchors on the owning requirement.
138
- - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
139
- - Do not proceed to final review while any blocking open question remains.
140
-
141
- After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
142
-
143
- ## Quality Bar
144
-
145
- Before declaring planning ready:
146
-
147
- - `prd.md` contains testable acceptance criteria.
148
- - `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
149
- - Repository-answerable questions have already been answered through inspection.
150
- - Blocking open questions are empty.
151
- - Complex tasks have `design.md` and `implement.md`.
152
- - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
153
- - The latest final planning summary has been presented to the user.
154
- - In a subsequent message, the user explicitly approved that summary for implementation.
155
-
156
- Do not start implementation merely because the user originally asked for implementation.
13
+ `task.py start` enters implementation only after the accepted Solution Design and Convergence Phase implementation contract and separate implementation authorization. The phase Skills define their own activities and acceptance conditions; do not impose a fixed number of questions, alternatives, or planning documents.
@@ -1,99 +1,22 @@
1
1
  ---
2
- description: "Trellis Copilot prompt: Finish Work — survey + archive task + record session journal"
2
+ description: "Record progress in the Trellis developer session journal."
3
3
  ---
4
4
 
5
5
  # Finish Work
6
6
 
7
- Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal. Code commits are NOT done here — those happen in workflow Phase 3.4 before you invoke this prompt.
7
+ Record progress in the developer session journal when ending this session. This prompt does not change task status, phase state, or implementation authorization. Task completion and cancellation are handled during Delivery Review and On-Site Closeout Phase through Trellis CLI.
8
8
 
9
- **Timing**: After Phase 3.4 (Commit changes) — when the working tree is already clean.
9
+ ## Review the current session
10
10
 
11
- ---
12
-
13
- ## Step 1: Survey current state
14
-
15
- ```bash
16
- python3 ./.trellis/scripts/get_context.py --mode record
17
- ```
18
-
19
- This prints:
20
-
21
- - **My active tasks** — review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
22
- - **Git status** — quick visual on what's dirty.
23
- - **Recent commits** — you'll need their hashes in Step 4 for `--commit`.
24
-
25
- If `--mode record` surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.
26
-
27
- ## Step 2: Sanity check — classify dirty paths
28
-
29
- Run:
30
-
31
- ```bash
32
- git status --porcelain
33
- ```
34
-
35
- Filter out paths under `.trellis/workspace/` and `.trellis/tasks/` — those are managed by `add_session.py` and `task.py archive` auto-commits and will appear dirty as part of this prompt's own work.
36
-
37
- For each remaining dirty path, decide whether it belongs to **the current task** or to **other parallel work** (e.g., another terminal window editing the same repo). Heuristics:
38
-
39
- - Paths referenced in the current task's `prd.md` / `implement.jsonl` / `check.jsonl` → current task
40
- - Paths in code areas matching the task's stated scope, or that you remember editing this session → current task
41
- - Paths in unrelated areas you have no recollection of touching this session → other parallel work
42
-
43
- Then route:
44
-
45
- - **Any remaining path looks like current-task work** — bail out with:
46
- > "Working tree has uncommitted code changes from this task: `<list>`. Return to workflow Phase 3.4 to commit them before running `/finish-work`."
47
-
48
- Do NOT run `git commit` here. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.
49
- - **All remaining paths look unrelated** (other parallel-window work) — report them once and continue to Step 3:
50
- > "FYI, dirty files outside this task's scope — leaving them for the other window: `<list>`."
51
- - **Genuinely unsure** — ask the user once: "Are `<list>` this task's work I forgot to commit, or another window's? (commit / ignore)" — then route per their answer.
11
+ python3 ./.trellis/scripts/get_context.py --mode record
52
12
 
53
- ## Step 3: Archive task(s)
13
+ Review the current task, repository changes, and recent commits. Make the journal summary clear about completed work, remaining work, and blockers. A clean working tree or committed changes do not by themselves mean the task is complete.
54
14
 
55
- ```bash
56
- python3 ./.trellis/scripts/task.py archive <task-name>
57
- ```
58
-
59
- At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a `chore(task): archive ...` commit via the script's auto-commit.
60
-
61
- If there is no active task and the user did not confirm any cleanup archives, skip this step.
62
-
63
- ## Step 4: Record session journal
64
-
65
- ```bash
66
- python3 ./.trellis/scripts/add_session.py \
67
- --title "Session Title" \
68
- --commit "hash1,hash2" \
69
- --summary "Brief summary"
70
- ```
71
-
72
- Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's `Recent commits` list, or via `git log --oneline`) for `--commit`. Do not include the archive commit hashes from Step 3. This produces a `chore: record journal` commit.
73
-
74
- Final git log order: `<work commits from 3.4>` → `chore(task): archive ...` (one or more) → `chore: record journal`.
75
-
76
- ---
77
-
78
- ## Relationship to Other Commands
79
-
80
- ```
81
- Development Flow (workflow.md Phase 3):
82
- 3.2 Debug retrospective (on demand)
83
- 3.3 Spec update
84
- 3.4 Commit changes -> AI drafts batched commits, user confirms
85
- 3.5 Wrap-up -> /finish-work (this prompt: survey + archive + journal)
86
- (3.1 was folded into 2.2 + 3.4 — see workflow.md "Phase 3: Finish" note)
87
-
88
- Debug Flow:
89
- Hit bug -> Fix -> /break-loop -> Knowledge capture
90
- ```
91
-
92
- - `/finish-work` — survey + archive + record session (this prompt)
93
- - `/break-loop` — deep analysis after debugging
94
-
95
- ---
15
+ ## Record the journal
96
16
 
97
- ## Core Principle
17
+ python3 ./.trellis/scripts/add_session.py \
18
+ --title "Session title" \
19
+ --commit "hash1,hash2" \
20
+ --summary "Progress, remaining work, and blockers"
98
21
 
99
- > **Finish-work is pure bookkeeping.** Code is already committed before this runs. If the working tree is dirty, this prompt refuses to proceed.
22
+ Pass only commit hashes that belong to this session. Omit --commit when no relevant commit exists. Leave task state to Trellis CLI and formal session handoff to its separate, explicitly requested workflow.
@@ -2,28 +2,21 @@
2
2
  description: "Trellis Copilot prompt: Method 1: Simple parameters"
3
3
  ---
4
4
 
5
- [!] **Prerequisite**: This command should only be used AFTER the human has tested and committed the code.
5
+ [!] **Prerequisite**: Record verified progress and the actual commit references for this session. Do not imply that the task is complete merely because work was committed.
6
6
 
7
- **Do NOT run `git commit` directly** — the scripts below handle their own commits for `.trellis/` metadata. You only need to read git history (`git log`, `git status`, `git diff`) and run the Python scripts.
7
+ Task status and phase state are changed only through Trellis CLI. This prompt records the developer session journal; it does not archive, complete, or cancel tasks.
8
8
 
9
9
  ---
10
10
 
11
11
  ## Record Work Progress
12
12
 
13
- ### Step 1: Get Context & Check Tasks
13
+ ### Step 1: Get Context
14
14
 
15
15
  ```bash
16
16
  python3 ./.trellis/scripts/get_context.py --mode record
17
17
  ```
18
18
 
19
- [!] Archive tasks whose work is **actually done** — judge by work status, not the `status` field in task.json:
20
- - Code committed? → Archive it (don't wait for PR)
21
- - All acceptance criteria met? → Archive it
22
- - Don't skip archiving just because `status` still says `planning` or `in_progress`
23
-
24
- ```bash
25
- python3 ./.trellis/scripts/task.py archive <task-name>
26
- ```
19
+ Review the current phase, changed files, recent commits, remaining work, and blockers. Use the Delivery Review and On-Site Closeout Phase Skill with the Trellis CLI to complete or cancel a task when its acceptance conditions are met.
27
20
 
28
21
  ### Step 2: One-Click Add Session
29
22
 
@@ -62,5 +55,4 @@ EOF
62
55
  |---------|---------|
63
56
  | `python3 ./.trellis/scripts/get_context.py --mode record` | Get context for record-session |
64
57
  | `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended, branch auto-complete)** |
65
- | `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task (auto-commits) |
66
58
  | `python3 ./.trellis/scripts/task.py list` | List active tasks |
@@ -4,7 +4,7 @@ description: "Trellis Copilot prompt: Start Session"
4
4
 
5
5
  # Start Session
6
6
 
7
- Initialize a Trellis-managed development session. This platform has no session-start hook, so manually load the equivalent context by following these steps (each one mirrors a section the hook would otherwise inject).
7
+ Use this prompt to inspect or refresh Trellis context. Copilot also supplies SessionStart context and a per-turn workflow-state breadcrumb through its hooks.
8
8
 
9
9
  ---
10
10
 
@@ -38,15 +38,13 @@ cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
38
38
  Index files list the specific guideline docs to read when you actually start coding.
39
39
 
40
40
  ## Step 4: Decide next action
41
- From Step 1 you know the current task and status. Check the task directory:
41
+ Use the current `<workflow-state>` breadcrumb to identify the business phase; task lifecycle status (`planning` or `in_progress`) and artifact presence do not identify that phase. If the breadcrumb is missing or stale, inspect the task with `task.py phase show <task>` and follow the matching phase Skill in `.trellis/workflow.md`.
42
42
 
43
- - **Active task status `planning` + no `prd.md`** → Phase 1.1. Load the `trellis-brainstorm` skill.
44
- - **Active task status `planning` + `prd.md` exists** → stay in Phase 1. Lightweight tasks can be PRD-only; complex tasks need `design.md` + `implement.md`. Load the relevant Phase 1 step detail before `task.py start`.
45
- - **Active task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
46
- ```bash
47
- {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase --step 2.1 --platform {{CLI_FLAG}}
48
- ```
49
- - **No active task** → classify first. For simple conversation / small task, ask only whether this turn should create a Trellis task. For complex work, ask whether you may create a Trellis task and enter planning. If the user says no, skip Trellis for this session.
43
+ - **An active phase is recorded** → continue that phase and load its matching Skill.
44
+ - **The task has no initialized phase route** → load `trellis-goal-exploration-and-requirements`, align and obtain the user's confirmation of the current requirements baseline, then initialize the applicable ordered route with `task.py phase init`.
45
+ - **No active task** → classify first. Handle a clear, low-risk, reversible, authorized, immediately verifiable request directly; otherwise ask for task-creation consent and begin with `trellis-goal-exploration-and-requirements`.
46
+
47
+ `task.py start` enters implementation only after an accepted implementation contract from Solution Design and Convergence Phase and separate implementation authorization.
50
48
 
51
49
  ---
52
50
 
@@ -54,7 +52,11 @@ From Step 1 you know the current task and status. Check the task directory:
54
52
 
55
53
  | User intent | Skill |
56
54
  |---|---|
57
- | New feature / unclear requirements | `trellis-brainstorm` |
55
+ | Goal and requirements | `trellis-goal-exploration-and-requirements` |
56
+ | Decision alternatives | `trellis-decision-space-construction-and-merging` |
57
+ | Solution design | `trellis-solution-design-and-convergence` |
58
+ | Implementation | `trellis-task-implementation` |
59
+ | Delivery review | `trellis-delivery-review-and-closeout` |
58
60
  | About to write code | `trellis-before-dev` |
59
61
  | Done coding / quality check | `trellis-check` |
60
62
  | Stuck / fixed same bug multiple times | `trellis-break-loop` |
@@ -27,8 +27,8 @@ In dsh:
27
27
  2. The main session dispatches `trellis-agent-research`,
28
28
  `trellis-agent-implement`, and `trellis-agent-check` through DSH's native
29
29
  `subagent` tool. Each child loads exactly one matching role skill.
30
- 3. Finish through `trellis-finish-work`, which preserves the required order:
31
- commit, archive, then journal.
30
+ 3. Use Delivery Review and On-Site Closeout Phase to review and close the task. `trellis-finish-work` records
31
+ session progress separately and does not change task lifecycle state.
32
32
 
33
33
  ## Companion plugin fallback contract
34
34
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "trellis",
3
- "description": "Trellis workflow main agent. Drives the Trellis development workflow: reads .trellis/workflow.md, classifies each turn, and routes work through plan / implement / check phases. Use as the default Kiro agent for projects that run Trellis.",
4
- "prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn telling you the active task and its current phase. An `agentSpawn` hook injects a `<session-context>` overview when this agent starts. Trust those injections to orient yourself — do not re-derive context from scratch.\n\n## How to Work\n\n1. **Follow the workflow.** `.trellis/workflow.md` is the single source of truth for phases and steps. It is also attached as a resource for this agent. Read it (or the injected Phase Index) and follow the matching phase.\n2. **Resolve the active task** with `python3 ./.trellis/scripts/task.py current --source` when the breadcrumb is missing or stale.\n3. **Classify the turn** before acting: simple conversation, small edit, or a complex task that needs a Trellis task directory + planning. Do not create a task for trivial turns.\n4. **Plan before implementing.** For complex work, write `prd.md` (and `design.md` / `implement.md` when warranted) and get the user's confirmation before entering implementation.\n5. **Load task context in order** for implementation/check: jsonl entries -> `prd.md` -> `design.md` (if present) -> `implement.md` (if present).\n6. **Verify** with the project's lint / type-check / test commands before declaring work done.\n\n## Constraints\n\n- Do NOT run `git commit` / `git push` / `git merge` unless the user explicitly asks.\n- Keep changes surgical and scoped to the request.\n- Discover guidelines on demand: `python3 ./.trellis/scripts/get_context.py --mode packages`.\n",
3
+ "description": "Trellis workflow main agent. Follows the current task route and matching Skills, or uses the taskless route when eligible.",
4
+ "prompt": "# Trellis Workflow Agent\n\nYou are the main session agent for a project that uses the Trellis workflow.\n\n## On Every Turn\n\nA `userPromptSubmit` hook injects a `<workflow-state>` breadcrumb each turn with the active task and its current phase. An `agentSpawn` hook injects a `<session-context>` overview when this agent starts. Use these to orient yourself; resolve missing or stale state through Trellis CLI.\n\n## How to Work\n\n1. Follow `.trellis/workflow.md` and the matching phase Skill. The workflow and its task route define the business phase; task lifecycle status and artifact presence do not.\n2. If the breadcrumb is missing or stale, inspect the active task with `python3 ./.trellis/scripts/task.py current --json` and `python3 ./.trellis/scripts/task.py phase show <task>`.\n3. With no active task, use the taskless route only when `.trellis/workflow.md` permits it; otherwise create the task and establish its baseline through Goal Exploration and Requirements Confirmation Phase.\n4. The Goal Exploration and Requirements Confirmation Phase requires the user's confirmation of the current requirements revision. Before Task Implementation and Test Verification Phase, both an accepted `implementation_contract` from Solution Design and Convergence Phase and separate implementation authorization are required. Delivery Review and On-Site Closeout Phase governs delivery acceptance, task completion, and cancellation.\n5. Use task artifacts and context manifests as required by the current route and any dispatched agent; do not require a fixed set of planning documents based only on task complexity.\n6. Verify with project checks appropriate to the changes before reporting completion.\n\n## Constraints\n\n- Do NOT run `git commit` / `git push` / `git merge` unless the user explicitly asks.\n- Keep changes scoped to the request.\n- Discover guidelines on demand: `python3 ./.trellis/scripts/get_context.py --mode packages`.\n",
5
5
  "tools": [
6
6
  "read",
7
7
  "write",
@@ -1,9 +1,20 @@
1
1
  <!-- TRELLIS:START -->
2
- # Trellis
2
+ # Trellis Instructions
3
3
 
4
- Follow `.trellis/workflow.md`; read the applicable `.trellis/spec/` guidance before editing code, and keep task facts in `.trellis/tasks/`. Project-scoped helpers live in `.agents/skills/`.
4
+ These instructions are for AI assistants working in this project.
5
5
 
6
- When a live Trellis Channel wait returns a host continuation, resume only that continuation until it resolves, times out, or errors. Do not run another host action meanwhile, including another wait, shell command, or status/message query; use diagnostics only on demand after it returns.
6
+ This project is managed by Trellis. The working knowledge you need lives under `.trellis/`:
7
+
8
+ - `.trellis/workflow.md` — development phases, when to create tasks, skill routing
9
+ - `.trellis/spec/` — package- and layer-scoped coding guidelines (read before writing code in a given layer)
10
+ - `.trellis/workspace/` — per-developer journals and session traces
11
+ - `.trellis/tasks/` — task records and their planning, implementation, and review artifacts
12
+
13
+ If a Trellis command is available on your platform (e.g. `/trellis:finish-work`, `/trellis:continue`), prefer it over manual steps. Not every platform exposes every command.
14
+
15
+ If you're using Codex or another agent-capable tool, additional project-scoped helpers may live in:
16
+ - `.agents/skills/` — reusable Trellis skills
17
+ - `.codex/agents/` — optional custom subagents
7
18
 
8
19
  Managed by Trellis. Edits outside this block are preserved; edits inside may be overwritten by a future `trellis update`.
9
20
 
@@ -216,7 +216,7 @@ When a CLI auto-detects a mode by probing a remote resource (e.g., checking if `
216
216
 
217
217
  **Real-world example**: Custom registry flow had 8 bugs across 3 review rounds: (1) probe only ran in interactive mode, (2) transient errors fell through to wrong mode, (3) giget URI had `#ref` in wrong position, (4) prefetched templates leaked across source switches, (5) `--template` shortcut bypassed probe but `downloadTemplateById` internally used catch-all `fetchTemplateIndex`, turning timeouts into "Template not found".
218
218
 
219
- **Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@pennixrv/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
219
+ **Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@mindfoldhq/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
220
220
 
221
221
  ---
222
222
 
@@ -284,7 +284,7 @@ When a CLI auto-detects a mode by probing a remote resource (e.g., checking if `
284
284
 
285
285
  **Real-world example**: Custom registry flow had 8 bugs across 3 review rounds: (1) probe only ran in interactive mode, (2) transient errors fell through to wrong mode, (3) giget URI had `#ref` in wrong position, (4) prefetched templates leaked across source switches, (5) `--template` shortcut bypassed probe but `downloadTemplateById` internally used catch-all `fetchTemplateIndex`, turning timeouts into "Template not found".
286
286
 
287
- **Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@pennixrv/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
287
+ **Real-world example**: Agent-session update hints fetched npm `latest` metadata with `response.read(4096)` and then parsed it as complete JSON. The `@mindfoldhq/trellis` package metadata exceeded 4 KB, so the JSON was truncated, parse failed silently, and the first session injection showed no update hint. Fix: read the complete response before parsing, and add a regression where `version` is followed by an 8 KB metadata tail.
288
288
 
289
289
  ---
290
290
 
@@ -319,9 +319,10 @@ CLI input → event writer → events.jsonl → reader → filter → reducer
319
319
  - [ ] Add at least one regression that proves history replay and live filtering
320
320
  use the same filter model
321
321
 
322
- **Real-world example**: Thread channels added `kind: "thread"`, `description`,
323
- `context`, labels, and `lastSeq`. The first implementation replayed thread
324
- state correctly, but several commands still re-parsed event payload fields with
325
- local casts. The fix was to make the core event layer own `ThreadChannelEvent`
326
- and `isThreadEvent`, make `reduceChannelMetadata` the only channel metadata
327
- projection, and make `reduceThreads` the only thread replay reducer.
322
+ **Real-world example**: Forum Teamwork Sessions added thread events with
323
+ `description`, `context`, labels, and sequence tracking. The first
324
+ implementation replayed thread state correctly, but several commands still
325
+ re-parsed event payload fields with local casts. The fix was to make Core own
326
+ `ThreadTeamworkEvent` and `isThreadEvent`, use
327
+ `reduceTeamworkSessionMetadata` for session metadata, and use `reduceThreads`
328
+ for thread replay.
@@ -600,7 +600,7 @@ When release notes or docs claim an asset is bundled, installed automatically, o
600
600
  included with Trellis, verify the whole distribution path:
601
601
 
602
602
  - [ ] Source file exists in the branch being tagged, not only in another branch,
603
- docs submodule, or marketplace tree.
603
+ docs submodule, or external Marketplace repository.
604
604
  - [ ] `pnpm build` copies the asset into `dist/templates/**`.
605
605
  - [ ] `npm pack --dry-run --json` includes the expected `dist/**` path.
606
606
  - [ ] The built binary installs the asset in a fresh temp repository.
@@ -17,7 +17,6 @@ workspace/
17
17
  |-- index.md # Personal index with session history
18
18
  |-- tasks/ # Task files
19
19
  | |-- *.json # Active tasks
20
- | +-- archive/ # Archived tasks by month
21
20
  +-- journal-N.md # Journal files (sequential: 1, 2, 3...)
22
21
  ```
23
22
 
@@ -59,7 +59,7 @@ function isInsideRoot(root: string, candidate: string): boolean {
59
59
  }
60
60
 
61
61
  // ---------------------------------------------------------------------------
62
- // Trusted context roots (mirrors packages/cli/src/commands/channel/context-trust.ts;
62
+ // Trusted context roots (mirrors packages/cli/src/commands/teamwork/context-trust.ts;
63
63
  // standalone copy since templates don't import from the CLI package).
64
64
  // ---------------------------------------------------------------------------
65
65
 
@@ -69,7 +69,7 @@ function stripTrustValue(s: string): string {
69
69
  return s.trim().replace(/\s*#.*$/, "").trim().replace(/^['"]|['"]$/g, "");
70
70
  }
71
71
 
72
- function parseChannelTrustSection(content: string): { trustedDirs: string[]; autoTrustSymlinks?: boolean } {
72
+ function parseTeamworkTrustSection(content: string): { trustedDirs: string[]; autoTrustSymlinks?: boolean } {
73
73
  const lines = content.split("\n");
74
74
  const trustedDirs: string[] = [];
75
75
  let autoTrustSymlinks: boolean | undefined;
@@ -115,7 +115,7 @@ function parseChannelTrustSection(content: string): { trustedDirs: string[]; aut
115
115
  const val = stripTrustValue(boolMatch[1]!).toLowerCase();
116
116
  if (val === "false") autoTrustSymlinks = false;
117
117
  else if (val === "true") autoTrustSymlinks = true;
118
- else process.stderr.write(`[channel] channel.auto_trust_trellis_symlinks: invalid value '${val}', ignoring\n`);
118
+ else process.stderr.write(`[teamwork] teamwork.auto_trust_trellis_symlinks: invalid value '${val}', ignoring\n`);
119
119
  continue;
120
120
  }
121
121
  }
@@ -128,7 +128,7 @@ function resolveTrustedRoots(projectRoot: string): string[] {
128
128
  let config: { trustedDirs: string[]; autoTrustSymlinks?: boolean } = { trustedDirs: [] };
129
129
  if (existsSync(configPath)) {
130
130
  try {
131
- config = parseChannelTrustSection(readFileSync(configPath, "utf-8"));
131
+ config = parseTeamworkTrustSection(readFileSync(configPath, "utf-8"));
132
132
  } catch {
133
133
  // ignore
134
134
  }
@@ -202,9 +202,9 @@ function displayProjectPath(projectRoot: string, filePath: string, taskDir?: str
202
202
  function resolveActiveTaskStatus(
203
203
  projectRoot: string,
204
204
  contextKey: string | null,
205
- ): { status: string; taskDir: string | null; taskTitle: string | null } {
205
+ ): { status: string; phaseStatus: string | null; taskDir: string | null; taskTitle: string | null } {
206
206
  const sessionsDir = join(projectRoot, ".trellis", ".runtime", "sessions");
207
- if (!existsSync(sessionsDir)) return { status: "no_task", taskDir: null, taskTitle: null };
207
+ if (!existsSync(sessionsDir)) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
208
208
 
209
209
  // --- 通过 context key 解析 session 文件 ---
210
210
  let sessionFilePath: string | null = null;
@@ -214,7 +214,7 @@ function resolveActiveTaskStatus(
214
214
  if (existsSync(candidate)) {
215
215
  sessionFilePath = candidate;
216
216
  } else {
217
- return { status: "no_task", taskDir: null, taskTitle: null };
217
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
218
218
  }
219
219
  } else {
220
220
  // No identity: use single-session fallback only when there is exactly one session file.
@@ -222,12 +222,12 @@ function resolveActiveTaskStatus(
222
222
  try {
223
223
  sessionFiles = readdirSync(sessionsDir).filter((f) => f.endsWith(".json"));
224
224
  } catch {
225
- return { status: "no_task", taskDir: null, taskTitle: null };
225
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
226
226
  }
227
227
  if (sessionFiles.length === 1) {
228
228
  sessionFilePath = join(sessionsDir, sessionFiles[0]);
229
229
  } else {
230
- return { status: "no_task", taskDir: null, taskTitle: null };
230
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
231
231
  }
232
232
  }
233
233
 
@@ -236,12 +236,12 @@ function resolveActiveTaskStatus(
236
236
  try {
237
237
  sessionData = JSON.parse(readFileSync(sessionFilePath, "utf-8"));
238
238
  } catch {
239
- return { status: "no_task", taskDir: null, taskTitle: null };
239
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
240
240
  }
241
241
 
242
242
  const currentTask = sessionData.current_task;
243
243
  if (typeof currentTask !== "string" || !currentTask)
244
- return { status: "no_task", taskDir: null, taskTitle: null };
244
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
245
245
 
246
246
  // Same jail the jsonl-referenced files already go through below. `task.py`
247
247
  // now refuses to store a ref that leaves the project, but a session file
@@ -249,19 +249,30 @@ function resolveActiveTaskStatus(
249
249
  // rewrite session files — so a poisoned pointer outlives the upgrade that
250
250
  // closed the writer.
251
251
  const taskDir = resolveProjectFile(projectRoot, currentTask, resolveTrustedRoots(projectRoot));
252
- if (!taskDir) return { status: "no_task", taskDir: null, taskTitle: null };
252
+ if (!taskDir) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
253
253
  const taskJsonPath = join(taskDir, "task.json");
254
- if (!existsSync(taskJsonPath)) return { status: "no_task", taskDir: null, taskTitle: null };
254
+ if (!existsSync(taskJsonPath)) return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
255
255
 
256
256
  let taskData: Record<string, unknown>;
257
257
  try {
258
258
  taskData = JSON.parse(readFileSync(taskJsonPath, "utf-8"));
259
259
  } catch {
260
- return { status: "no_task", taskDir: null, taskTitle: null };
260
+ return { status: "no_task", phaseStatus: null, taskDir: null, taskTitle: null };
261
261
  }
262
262
 
263
+ const taskMeta = taskData.meta;
264
+ const phaseWorkflow = taskMeta && typeof taskMeta === "object" && !Array.isArray(taskMeta)
265
+ ? (taskMeta as Record<string, unknown>).task_workflow as Record<string, unknown> | undefined
266
+ : undefined;
267
+ const route = phaseWorkflow?.phase_ids;
268
+ const phaseId = phaseWorkflow?.current_phase_id || (Array.isArray(route) ? route[route.length - 1] : undefined);
269
+ const phaseMap = phaseWorkflow?.phases;
270
+ const phase = typeof phaseId === "string" && phaseMap && typeof phaseMap === "object" && !Array.isArray(phaseMap)
271
+ ? (phaseMap as Record<string, Record<string, unknown>>)[phaseId]
272
+ : null;
263
273
  return {
264
- status: typeof taskData.status === "string" ? taskData.status : "planning",
274
+ status: typeof phaseId === "string" && phase ? phaseId : (typeof taskData.status === "string" ? taskData.status : "planning"),
275
+ phaseStatus: typeof phase?.status === "string" ? phase.status : null,
265
276
  taskDir,
266
277
  taskTitle: typeof taskData.title === "string" ? taskData.title : null,
267
278
  };
@@ -818,7 +829,7 @@ class TurnContextCache {
818
829
  return { workflowMsg: this.workflowMsg };
819
830
  }
820
831
 
821
- const { status } = resolveActiveTaskStatus(projectRoot, contextKey);
832
+ const { status, phaseStatus } = resolveActiveTaskStatus(projectRoot, contextKey);
822
833
 
823
834
  const workflowPath = join(projectRoot, ".trellis", "workflow.md");
824
835
  let workflowMd = "";
@@ -839,7 +850,7 @@ class TurnContextCache {
839
850
  // When skip keyword is present, skip workflow state injection this turn
840
851
  this.workflowMsg = this.skipThisTurn
841
852
  ? ""
842
- : `<workflow-state>\n${workflowBody}\n</workflow-state>\n\n<session-overview>\n${SESSION_OVERVIEW_TEXT}\n</session-overview>`;
853
+ : `<workflow-state>\n${phaseStatus ? `Phase: ${status} (${phaseStatus})\n` : ""}${workflowBody}\n</workflow-state>\n\n<session-overview>\n${SESSION_OVERVIEW_TEXT}\n</session-overview>`;
843
854
 
844
855
  this.key = cacheKey;
845
856
  this.timestamp = now;