@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
@@ -0,0 +1,186 @@
1
+ {
2
+ "version": "0.7.1-beta.1",
3
+ "description": "Remove retired Channel, subnode and planning workflow assets",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "Hash-verified cleanup removes retired generated roles, helpers and skills without migrating existing tasks.",
7
+ "migrations": [
8
+ {
9
+ "type": "safe-file-delete",
10
+ "from": ".trellis/agents/check.md",
11
+ "description": "Retired generated asset; current native workflow no longer provides this file",
12
+ "allowed_hashes": [
13
+ "edb4f57361407249a53bf5998ebf91c40d2b969e826a2c5e1b4e813a08bcb175"
14
+ ]
15
+ },
16
+ {
17
+ "type": "safe-file-delete",
18
+ "from": ".trellis/agents/implement.md",
19
+ "description": "Retired generated asset; current native workflow no longer provides this file",
20
+ "allowed_hashes": [
21
+ "66e25ad046c94869442834bc3cdfbd5a9a7412d3ff54561d64d2886552c27e87"
22
+ ]
23
+ },
24
+ {
25
+ "type": "safe-file-delete",
26
+ "from": ".trellis/agents/subnode.md",
27
+ "description": "Retired generated asset; current native workflow no longer provides this file",
28
+ "allowed_hashes": [
29
+ "e3cbcbb9cafcd931d0725c91e97955469f23ba64db92eee10c66d465ce2896d5"
30
+ ]
31
+ },
32
+ {
33
+ "type": "safe-file-delete",
34
+ "from": ".trellis/agents/subnode-profiles.json",
35
+ "description": "Retired generated asset; current native workflow no longer provides this file",
36
+ "allowed_hashes": [
37
+ "b862bd997cb8874ae0e167ca47abcd315840e6a6102373c3e516e969f14ee8a2"
38
+ ]
39
+ },
40
+ {
41
+ "type": "safe-file-delete",
42
+ "from": ".trellis/scripts/subnode_artifact.py",
43
+ "description": "Retired generated asset; current native workflow no longer provides this file",
44
+ "allowed_hashes": [
45
+ "35a9f0476f2e719cb82716fabcb38c0bc4004e76e8d7b63bd3ebffdb62d3aac2"
46
+ ]
47
+ },
48
+ {
49
+ "type": "safe-file-delete",
50
+ "from": ".trellis/scripts/workspace_note.py",
51
+ "description": "Retired generated asset; current native workflow no longer provides this file",
52
+ "allowed_hashes": [
53
+ "2159a1445ff80e63e2e81d1589445d18710ae81bd54d1e6fd1a9b9b1ee629081"
54
+ ]
55
+ },
56
+ {
57
+ "type": "safe-file-delete",
58
+ "from": ".trellis/scripts/common/context_projection.py",
59
+ "description": "Retired generated asset; current native workflow no longer provides this file",
60
+ "allowed_hashes": [
61
+ "a1699dad6a35c5d8b53110be40d2d5da60b1b561290f83141348f9845497301f"
62
+ ]
63
+ },
64
+ {
65
+ "type": "safe-file-delete",
66
+ "from": ".trellis/scripts/common/continuation_record.py",
67
+ "description": "Retired generated asset; current native workflow no longer provides this file",
68
+ "allowed_hashes": [
69
+ "17e7d7198052a3214adf0240efdeb474538e1c670f79d03ee292af6c7b5f02b5"
70
+ ]
71
+ },
72
+ {
73
+ "type": "safe-file-delete",
74
+ "from": ".trellis/scripts/common/ownership_record.py",
75
+ "description": "Retired generated asset; current native workflow no longer provides this file",
76
+ "allowed_hashes": [
77
+ "023f30f568e2a0acccb84f2626d4f996b1f08e1ffd651a7caebf139e18a75254"
78
+ ]
79
+ },
80
+ {
81
+ "type": "safe-file-delete",
82
+ "from": ".trellis/scripts/common/task_migration.py",
83
+ "description": "Retired generated asset; current native workflow no longer provides this file",
84
+ "allowed_hashes": [
85
+ "386af968f10ff76dc223637d36b179354924a4e0ffcf6f077eaee67ed086f7c6"
86
+ ]
87
+ },
88
+ {
89
+ "type": "safe-file-delete",
90
+ "from": ".trellis/scripts/common/task_planning.py",
91
+ "description": "Retired generated asset; current native workflow no longer provides this file",
92
+ "allowed_hashes": [
93
+ "7893ba09bbdcdec99d3cb987463d9e14d4d962ba460f03e2c717d9f4fc26dd89"
94
+ ]
95
+ },
96
+ {
97
+ "type": "safe-file-delete",
98
+ "from": ".agents/skills/trellis-channel/SKILL.md",
99
+ "description": "Retired generated asset; current native workflow no longer provides this file",
100
+ "allowed_hashes": [
101
+ "a6f602aa5c0e57ec0638bc9c99bfcf7c9a3608b0b3364ac4782dfe91e4351f64"
102
+ ]
103
+ },
104
+ {
105
+ "type": "safe-file-delete",
106
+ "from": ".agents/skills/trellis-channel/references/command-reference.md",
107
+ "description": "Retired generated asset; current native workflow no longer provides this file",
108
+ "allowed_hashes": [
109
+ "35c3e0c7e11660ac0e25ae8debb727d5439a35f71b79eef4a3982ad5c9836229"
110
+ ]
111
+ },
112
+ {
113
+ "type": "safe-file-delete",
114
+ "from": ".agents/skills/trellis-channel/references/forum.md",
115
+ "description": "Retired generated asset; current native workflow no longer provides this file",
116
+ "allowed_hashes": [
117
+ "9ab0491262aeb1db34d42aa065115689a41b7becea093de2c4ec12a8d8a3deda"
118
+ ]
119
+ },
120
+ {
121
+ "type": "safe-file-delete",
122
+ "from": ".agents/skills/trellis-channel/references/multi-target-dispatch.md",
123
+ "description": "Retired generated asset; current native workflow no longer provides this file",
124
+ "allowed_hashes": [
125
+ "7f74841c6dedc58ccfd7de946c9ffc789ca11ef7b95c8cd516e1f78c26c15140"
126
+ ]
127
+ },
128
+ {
129
+ "type": "safe-file-delete",
130
+ "from": ".agents/skills/trellis-channel/references/progress-debugging.md",
131
+ "description": "Retired generated asset; current native workflow no longer provides this file",
132
+ "allowed_hashes": [
133
+ "78f9771b281056fc9ed17ca889404caab66afb4b89d624bb6346f5e82a06b52a"
134
+ ]
135
+ },
136
+ {
137
+ "type": "safe-file-delete",
138
+ "from": ".agents/skills/trellis-channel/references/subnode-work.md",
139
+ "description": "Retired generated asset; current native workflow no longer provides this file",
140
+ "allowed_hashes": [
141
+ "ba900fcb3d7054bcdb65bbeefa1731e9c73c8f6d95d7d6c2832b0d94e8c5f95f"
142
+ ]
143
+ },
144
+ {
145
+ "type": "safe-file-delete",
146
+ "from": ".agents/skills/trellis-channel/references/workers.md",
147
+ "description": "Retired generated asset; current native workflow no longer provides this file",
148
+ "allowed_hashes": [
149
+ "4785c3ec1a19c078b05ea6f47610e020b3dc6e0b4aeac3cf4ae81c41ab1d5e26"
150
+ ]
151
+ },
152
+ {
153
+ "type": "safe-file-delete",
154
+ "from": ".agents/skills/trellis-channel/references/workflows.md",
155
+ "description": "Retired generated asset; current native workflow no longer provides this file",
156
+ "allowed_hashes": [
157
+ "cf083518eb81331f64908388694d6b887b640a59c1bf064d369f9efef81c92b9"
158
+ ]
159
+ },
160
+ {
161
+ "type": "safe-file-delete",
162
+ "from": ".agents/skills/trellis-idea-to-closed-plan/SKILL.md",
163
+ "description": "Retired generated asset; current native workflow no longer provides this file",
164
+ "allowed_hashes": [
165
+ "9ab419254b3815ada79ae961aee3e73cbbacc9d3eeb085042ff97d94a6654cd2"
166
+ ]
167
+ },
168
+ {
169
+ "type": "safe-file-delete",
170
+ "from": ".agents/skills/trellis-meta/references/local-architecture/multi-agent-channel.md",
171
+ "description": "Retired generated asset; current native workflow no longer provides this file",
172
+ "allowed_hashes": [
173
+ "af7d5fc2ee374f66f71da90a5770ced217c3a8459537ec4e08d57cd64f91cb72"
174
+ ]
175
+ },
176
+ {
177
+ "type": "safe-file-delete",
178
+ "from": ".agents/skills/trellis-research-record/SKILL.md",
179
+ "description": "Retired generated asset; current native workflow no longer provides this file",
180
+ "allowed_hashes": [
181
+ "f433da1e9fe6f5003a2c4330a72b2998433b91e4b73d4d2c22622a620ad0966a"
182
+ ]
183
+ }
184
+ ],
185
+ "notes": "Run trellis update without --migrate. Modified files remain protected; old task records and handoff history are not migrated."
186
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.7.1",
3
+ "description": "引入新的 Trellis 任务工作流、Teamwork 协作和默认内置原生工作流。",
4
+ "breaking": true,
5
+ "recommendMigrate": false,
6
+ "changelog": "稳定版引入新的 Trellis 任务工作流和 Teamwork 协作,默认工作流随 CLI 打包提供。旧 Channel 运行时数据不会迁移到新的任务模型。",
7
+ "migrations": [],
8
+ "notes": "本版本不迁移或导入旧 Channel 运行时数据。"
9
+ }
@@ -111,13 +111,6 @@ def _get_current_task_for_input(trellis_dir: Path, cc_data: dict) -> dict | None
111
111
  return None
112
112
 
113
113
  active = resolve_active_task(trellis_dir.parent, cc_data, platform="claude")
114
- if active.source_type == "unbound_ambiguous":
115
- return {
116
- "title": f"Task binding ambiguous ({len(active.candidate_paths)} candidates)",
117
- "status": "unbound_ambiguous",
118
- "priority": "P?",
119
- "source": active.source,
120
- }
121
114
  if not active.task_path:
122
115
  return None
123
116
 
@@ -229,14 +229,6 @@ def _resolve_task_dir(trellis_dir: Path, task_ref: str) -> Path:
229
229
 
230
230
  def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
231
231
  active = _resolve_active_task(trellis_dir, hook_input)
232
- if active.source_type == "unbound_ambiguous":
233
- candidates = "\n".join(f"- {candidate}" for candidate in active.candidate_paths)
234
- return (
235
- "Status: TASK BINDING AMBIGUOUS\n"
236
- f"Candidates:\n{candidates}\n"
237
- "Next: Review the candidates and run `python3 ./.trellis/scripts/task.py start <task>` "
238
- "with the intended task once a direct session identity is available."
239
- )
240
232
  if not active.task_path:
241
233
  return (
242
234
  "Status: NO ACTIVE TASK\n"
@@ -266,13 +258,9 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
266
258
  if task_status == "completed":
267
259
  return (
268
260
  f"Status: COMPLETED\nTask: {task_title}\n"
269
- f"Next: Archive with `python3 ./.trellis/scripts/task.py archive {task_dir.name}` "
270
- "or start a new task."
261
+ "Next: Start another task or end the session; finish-work only records the session journal."
271
262
  )
272
263
 
273
- has_prd = (task_dir / "prd.md").is_file()
274
- has_design = (task_dir / "design.md").is_file()
275
- has_implement = (task_dir / "implement.md").is_file()
276
264
  present = [
277
265
  name
278
266
  for name in ("prd.md", "design.md", "implement.md", "implement.jsonl", "check.jsonl")
@@ -280,20 +268,18 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
280
268
  ]
281
269
  present_line = ", ".join(present) if present else "none"
282
270
 
283
- if not has_prd:
284
- return (
285
- f"Status: PLANNING\nTask: {task_title}\nPresent: {present_line}\n"
286
- "Next: Load trellis-brainstorm and write prd.md. Stay in planning."
287
- )
288
-
289
271
  if task_status == "planning":
290
- if has_design and has_implement:
291
- next_action = "Review planning artifacts with the user before `task.py start`."
292
- else:
293
- next_action = (
294
- "Lightweight task can ask for start review with PRD-only; "
295
- "complex task must add design.md and implement.md before `task.py start`."
296
- )
272
+ next_action = (
273
+ "Follow the current per-turn workflow-state. Task lifecycle status and artifact presence "
274
+ "do not identify the business phase. If no phase route is initialized, load "
275
+ "`trellis-goal-exploration-and-requirements` and confirm the requirements baseline "
276
+ "before initializing the route."
277
+ )
278
+ if any(
279
+ path.is_file() and not _has_curated_jsonl_entry(path)
280
+ for path in (task_dir / "implement.jsonl", task_dir / "check.jsonl")
281
+ ):
282
+ next_action += " Curate task context manifests only when a dispatched agent needs them."
297
283
  return (
298
284
  f"Status: PLANNING\nTask: {task_title}\nPresent: {present_line}\n"
299
285
  f"Next: {next_action}"
@@ -301,8 +287,9 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
301
287
 
302
288
  return (
303
289
  f"Status: {task_status.upper()}\nTask: {task_title}\nPresent: {present_line}\n"
304
- "Next: Follow the matching per-turn workflow-state. Context order is jsonl entries, "
305
- "prd.md, design.md if present, implement.md if present."
290
+ "Next: Follow the matching per-turn workflow-state; task lifecycle status does not "
291
+ "identify the business phase. Context order is jsonl entries, `prd.md`, `design.md` "
292
+ "if present, `implement.md` if present."
306
293
  )
307
294
 
308
295
 
@@ -391,10 +378,7 @@ def _build_compact_current_state(
391
378
  lines.append(_format_git_state(repo_root))
392
379
 
393
380
  active = _resolve_active_task(trellis_dir, hook_input)
394
- if active.source_type == "unbound_ambiguous":
395
- candidates = ", ".join(active.candidate_paths)
396
- lines.append(f"Current task: ambiguous; candidates={candidates}; bind explicitly.")
397
- elif active.task_path:
381
+ if active.task_path:
398
382
  task_dir = _resolve_task_dir(trellis_dir, active.task_path)
399
383
  status = "unknown"
400
384
  task_json = task_dir / "task.json"
@@ -436,14 +420,23 @@ def _extract_range(content: str, start_header: str, end_header: str) -> str:
436
420
  lines = content.splitlines()
437
421
  start: "int | None" = None
438
422
  end: int = len(lines)
439
- start_match = f"## {start_header}"
440
- end_match = f"## {end_header}"
423
+ start_matches = {f"## {start_header}", "## 阶段索引", "## Phase Index"}
424
+ end_matches = {
425
+ f"## {end_header}",
426
+ f"### {end_header}",
427
+ }
428
+ phase_titles = ("目标探索与需求核对阶段", "Goal Exploration and Requirements Confirmation Phase")
441
429
  for i, line in enumerate(lines):
442
430
  stripped = line.strip()
443
- if start is None and stripped == start_match:
431
+ if start is None and stripped in start_matches:
444
432
  start = i
445
433
  continue
446
- if start is not None and stripped == end_match:
434
+ heading = stripped.lstrip("#").strip()
435
+ is_phase_heading = stripped.startswith(("## ", "### ")) and any(
436
+ heading == title or heading.endswith((f":{title}", f": {title}"))
437
+ for title in phase_titles
438
+ )
439
+ if start is not None and (stripped in end_matches or is_phase_heading):
447
440
  end = i
448
441
  break
449
442
  if start is None:
@@ -491,11 +484,11 @@ def _build_workflow_toc(workflow_path: Path) -> str:
491
484
 
492
485
  out_lines = [
493
486
  "# Development Workflow - Session Summary",
494
- "Full guide: .trellis/workflow.md. Step detail: `python3 ./.trellis/scripts/get_context.py --mode phase --step <X.Y>`.",
487
+ "Full guide: .trellis/workflow.md. Phase detail: load the Skill named in the active phase breadcrumb.",
495
488
  "",
496
489
  ]
497
490
 
498
- phases = _extract_range(content, "Phase Index", "Phase 1: Plan")
491
+ phases = _extract_range(content, "阶段索引", "目标探索与需求核对阶段")
499
492
  if phases:
500
493
  out_lines.append(_strip_breadcrumb_tag_blocks(phases).rstrip())
501
494
 
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: trellis-decision-space-construction-and-merging
3
+ description: 当前任务进入决策空间构造与归并阶段时,整理实质决策、候选、证据、依赖与决策树。
4
+ ---
5
+
6
+ # 决策空间构造与归并阶段
7
+
8
+ 当 `current_phase_id` 为 `decision_space_construction_and_merging` 时使用。阅读本 Skill 同目录的 `workflow.md`,并基于已确认且仍有效的需求基线工作。
9
+
10
+ 决策空间构造与归并阶段负责展示和归并决策空间,不代替用户锁定保留决定。简单问题使用清单或比较表;只有前置选择或条件会改变后续选项时才建立决策树。阶段结果由 Trellis CLI 接受;无实质候选差异时可按证据跳过本阶段。
@@ -0,0 +1,40 @@
1
+ # 决策空间构造与归并阶段流程
2
+
3
+ 核对目标探索与需求核对阶段已确认的目标基线及当前 `artifact_revision`。判断候选差异、条件分支是否会影响交付、验收、风险或下游选择。若没有实质差异,可记录基线引用、跳过理由、解决方案设计与收敛阶段的最低输入和需要重新进入本阶段的变化条件,再由 Trellis CLI 核验跳过。
4
+
5
+ 需要构造时,梳理决策项及其权限、候选、重要排除项与理由;按需补齐证据、适用约束、标准、阈值、依赖、影响和优先级。证据足够时给出推荐;证据不足则保留未知或待决项,不伪造结论。仅当选择之间存在条件依赖时使用决策树,并标明分支条件、来源、未知路径及其下游影响。互斥、共享依赖或汇合关系可用依赖图;独立候选用比较表或清单即可。
6
+
7
+ 新颖机制、重大重构、跨组件边界变化或关键取舍缺少可信本地先例时,进行有界的 `prior-art review`,记录适用性与采纳或排除理由。只读 Teamwork 可按需补充证据;主代理核验报告后归并。将 `DecisionSpace` 或有据跳过记录交由 Trellis CLI 接受,待用户决定交由解决方案设计与收敛阶段处理。
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ input["核对已确认且仍有效的需求基线"] --> material{"差异或条件分支会改变交付、验收、风险或下游选择?"}
12
+ material -->|"否"| skip["记录 revision、理由、解决方案设计与收敛阶段所需的最低输入和重入条件"]
13
+ skip --> accepted["Trellis CLI 核验并接受跳过记录"]
14
+ material -->|"是"| items["整理决策项、权限、候选和重要排除项"]
15
+ items --> evidence["补充适用证据、标准、依赖、优先级和影响"]
16
+ evidence --> prior{"触发 prior-art review 条件?"}
17
+ prior -->|"是"| review["有界核对相关开源实现或公开提案"]
18
+ prior -->|"否"| merge["汇总当前证据"]
19
+ review --> merge
20
+ evidence --> teamwork_gate{"只读 Teamwork 评议有净收益?"}
21
+ teamwork_gate -->|"是"| teamwork["获取并核验只读 Teamwork 报告"]
22
+ teamwork_gate -->|"否"| merge
23
+ teamwork --> merge
24
+ merge --> representation{"候选关系需要条件分支吗?"}
25
+ representation -->|"是"| tree["建立可追溯决策树并标明相关未知路径"]
26
+ representation -->|"否"| simple["使用清单、比较表或适用的依赖图"]
27
+ tree --> assess["核对证据、覆盖范围、关系与当前 revision"]
28
+ simple --> assess
29
+ assess -->|"目标或范围变化"| goal_exploration_and_requirements["回到目标探索与需求核对阶段,更新基线"]
30
+ assess -->|"证据或候选仍有缺口"| items
31
+ assess -->|"可供方案收敛"| output["Trellis CLI 接受 DecisionSpace"]
32
+ accepted --> solution_design_and_convergence["进入解决方案设计与收敛阶段"]
33
+ output --> solution_design_and_convergence
34
+ ```
35
+
36
+ ### 离开阶段的条件
37
+
38
+ - 有实质决策空间时,候选、关键证据、关系、未知项和推荐均能支持下一阶段比较;不要求固定字段数量或同时使用多种图表。
39
+ - 无实质差异时,跳过记录须能说明当前基线、判断依据和重新进入条件。
40
+ - 保留用户决定不在本阶段锁定;外部参考不替代项目事实或用户选择。
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: trellis-delivery-review-and-closeout
3
+ description: 当前任务进入交付审查与现场收尾阶段时,核对当前交付候选、未结事项、接受条件和资源处置。
4
+ ---
5
+
6
+ # 交付审查与现场收尾阶段
7
+
8
+ 当 `current_phase_id` 为 `delivery_review_and_closeout` 时使用。阅读本 Skill 同目录的 `workflow.md`,只审查当前路线和 revision 下的交付,不在本阶段重新设计或实施。
9
+
10
+ 本阶段核验交付与合同、接受条件、工作包、集成、验证、未结发现和资源事实。当前合同内缺口按最早受影响阶段回流或暂停;合同外遗留应记录责任方、触发条件、影响和后续引用。满足交付条件后由 Trellis CLI 接受;只有明确撤回才进入取消处置。会话交接包是独立附加操作,不是阶段或任务收尾的前置条件。
@@ -0,0 +1,55 @@
1
+ # 交付审查与现场收尾阶段流程
2
+
3
+ 绑定当前 `task_route_revision`、输入和结果 revision,按解决方案设计与收敛阶段确认的优先级和依赖检查任务实施与测试验证阶段的工作包、适用的集成与验证、合同差异和未结发现;只有路线实际涉及必需子任务或受托资源时,才核对相应事实。分析型路线只核对实际分析产物,不制造实施工作包。验证按通过、失败、未运行或受限记录;合同允许且风险可接受时说明未运行原因、影响和替代证据,否则暂停或回到任务实施与测试验证阶段。
4
+
5
+ 实施、集成或必需验证缺陷回到任务实施与测试验证阶段;方案、合同、风险、依赖、回退或停止条件失效回到解决方案设计与收敛阶段;候选、标准或条件变化回到决策空间构造与归并阶段;目标、范围或接受目标变化回到目标探索与需求核对阶段。必要证据缺失时,暂停并停留在交付审查与现场收尾阶段;必要用户决定缺失时,通过 `pennix-decision-grill` 同步请求决定,答复前保持暂停,收到答复后重新核对当前输入和受影响阶段。当前合同内未完成工作不能改记为遗留后关闭。合同外、已明确延期或撤回后不继续的事项,可在现有收尾产物中记录范围、责任方、触发条件、影响和后续任务引用;没有遗留时不另造清单。
6
+
7
+ 满足当前合同且没有待处理缺口时,由 Trellis CLI 接受交付审查并形成 `delivery_ready`;`no_go` 也须经交付审查与现场收尾阶段后才能完成任务。只有合同、用户明确要求或不可由主代理替代的重要价值与风险取舍需要用户接受时,才等待用户确认。用户要求修改或拒绝时,使当前交付候选失效并按影响回流。调用 `complete` 前核验任务生命周期;只有路线实际创建、委派或依赖外部执行资源时,才核验其处置状态。相关资源仍可能写入、泄露、造成数据风险或状态无法确认时,保留现场并阻止完成。若用户明确撤回,Trellis CLI 将路线收敛为仅包含交付审查与现场收尾阶段并记录原因;存在关联子任务时,逐项记录继续、转为独立任务或取消的决定及依据,继续时保留父子关系,转为独立任务时记录子任务和依据后再解除关系,取消时另行执行子任务自身的取消流程。完成子任务处置后,再核验当前路线实际涉及的外部执行资源;资源仍可能写入、泄露、造成数据风险或状态无法确认时保留现场并阻止取消,风险解除后才调用 `cancel --reason`。
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ candidate["绑定当前 revision 的分析产物或实施交付候选"] --> review["按当前合同核验工作包、适用的集成与验证、差异及相关子任务和资源"]
12
+ review --> gaps{"存在合同内缺口或失效事实?"}
13
+ gaps -->|"实施、集成或必需验证"| task_implementation["回到任务实施与测试验证阶段"]
14
+ gaps -->|"方案或合同"| solution_design_and_convergence["回到解决方案设计与收敛阶段"]
15
+ gaps -->|"候选、标准或条件"| decision_space_construction_and_merging["回到决策空间构造与归并阶段"]
16
+ gaps -->|"目标、范围或接受目标"| goal_exploration_and_requirements["回到目标探索与需求核对阶段"]
17
+ gaps -->|"必要证据缺失"| wait["暂停并留在交付审查与现场收尾阶段"]
18
+ gaps -->|"必要用户决定缺失"| decision_grill["pennix-decision-grill 同步请求必要决定;答复前暂停"]
19
+ decision_grill --> candidate
20
+ wait --> candidate
21
+ gaps -->|"无"| residual{"是否有可保留的合同外或已延期遗留?"}
22
+ residual -->|"是"| record["记录责任方、触发条件、影响和后续引用"]
23
+ residual -->|"否"| accept["Trellis CLI 接受 delivery_ready 或 no_go"]
24
+ record --> accept
25
+ accept --> user_gate{"交付合同、用户明确要求或不可由主代理替代的价值/风险取舍要求用户接受?"}
26
+ user_gate -->|"否"| ready["核验任务生命周期及适用资源后按条件 complete"]
27
+ user_gate -->|"是"| ask_accept["pennix-decision-grill 同步请求用户接受"]
28
+ ask_accept --> answer{"用户答复是否明确?"}
29
+ answer -->|"接受"| ready
30
+ answer -->|"未答复或答复不清"| user_wait["保持暂停并等待明确答复"]
31
+ user_wait --> candidate
32
+ answer -->|"要求修订或拒绝"| invalidate["使当前交付候选失效并判断最早受影响阶段"]
33
+ invalidate -->|"实施、集成或验证"| task_implementation
34
+ invalidate -->|"候选、标准或条件"| decision_space_construction_and_merging
35
+ invalidate -->|"方案或合同"| solution_design_and_convergence
36
+ invalidate -->|"目标、范围或接受目标"| goal_exploration_and_requirements
37
+ withdraw["用户明确撤回"] --> cancel_route["Trellis CLI 将路线收敛为仅‘交付审查与现场收尾阶段’并记录原因"]
38
+ cancel_route --> child_disposition{"关联子任务如何处置?"}
39
+ child_disposition -->|"继续"| child_continue["保留父子关系"]
40
+ child_disposition -->|"转为独立任务"| child_independent["记录子任务标识与依据后解除父子关系"]
41
+ child_disposition -->|"取消"| child_cancel["另行执行子任务自身的取消流程"]
42
+ child_disposition -->|"无关联子任务"| cancelReview
43
+ child_continue --> cancelReview
44
+ child_independent --> cancelReview
45
+ child_cancel --> cancelReview
46
+ cancelReview["核验当前路线涉及的子任务和资源处置"]
47
+ cancelReview --> safe{"是否仍有资源可能写入、泄露或造成数据风险?"}
48
+ safe -->|"是或状态未知"| preserve["保留现场并阻止取消"]
49
+ preserve --> cancelReview
50
+ safe -->|"否"| cancel["Trellis CLI cancel --reason"]
51
+ ```
52
+
53
+ ### 与会话交接的边界
54
+
55
+ 正式会话交接包仅在用户明确要求时按其独立 Skill 处理。它不改变阶段、路线或任务状态,也不是 `delivery_ready`、`complete` 或 `cancel` 的前置条件。
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: trellis-goal-exploration-and-requirements
3
+ description: 当前任务处于目标探索与需求核对阶段时,核对目标、范围、成功条件、约束、证据与用户确认。
4
+ ---
5
+
6
+ # 目标探索与需求核对阶段
7
+
8
+ 当 Trellis 任务的 `current_phase_id` 为 `goal_exploration_and_requirements` 时使用。先阅读本 Skill 同目录的 `workflow.md`,再按当前项目事实选择必要的探索深度和证据来源。
9
+
10
+ 阶段产物和用户确认通过 Trellis CLI 记录。离开本阶段前,必须由用户明确确认绑定当前 `artifact_revision` 的目标与需求基线;只要求修订或尚未确认时,继续停留在本阶段。确认不等于最终方案批准或实施授权。
@@ -0,0 +1,33 @@
1
+ # 目标探索与需求核对阶段流程
2
+
3
+ 先核对用户请求、目标对象和项目背景。新项目明确问题、用户、领域及系统边界;既有项目核对目标仓库、组件、当前版本、适用规则、现状和影响范围。按问题选择本地源码、历史记录、外部资料或用户维护知识等证据来源;只在独立取证有净收益时使用 Trellis Teamwork。
4
+
5
+ 整理目标、范围、成功条件、关键约束和责任方。区分已知事实、假设、证据冲突和未知事项;缺少会改变目标或路线的用户事实时,通过 `pennix-decision-grill` 同步询问。记录会阻断推进的问题及恢复条件;不影响当前路线的事项可明确责任方和后续处理。
6
+
7
+ 形成 `phase_output`,至少包含当前目标与需求基线、必要证据、不确定性、`phase_result` 和非约束性的 `route_advice`。`route_advice` 简要说明任务类型、复杂度画像和项目背景如何影响阶段选择,并记录复杂度判断的实际触发维度与理由;不机械计分或套用固定路由矩阵,也不要求固定字段或篇幅。路线发生变化时,使用 Trellis CLI 更新受影响的分类和阶段,并按影响范围重新核验。阶段可等待用户补充或因依赖阻塞;只有用户确认当前基线且阶段产物有效时,才以 `accepted` 离开本阶段。将阶段产物及引用提交 Trellis CLI 核验后,向用户展示简明基线并请求确认或修订。
8
+
9
+ ```mermaid
10
+ flowchart TD
11
+ request["核对请求、项目背景和目标对象"] --> evidence["选择必要证据并核验现状"]
12
+ evidence --> baseline["整理目标、范围、成功条件与约束"]
13
+ baseline --> enough{"关键事实是否足以形成基线?"}
14
+ enough -->|"否,需用户补充"| ask["Trellis CLI 记录 needs_user_input;同步询问"]
15
+ ask --> wait["等待答复并留在目标探索与需求核对阶段"]
16
+ wait --> evidence
17
+ enough -->|"否,依赖阻断"| blocked["记录 blocked 与恢复条件"]
18
+ blocked -->|"依赖恢复后"| evidence
19
+ enough -->|"是"| output["形成 phase_output 并由 Trellis CLI 核验"]
20
+ output --> confirm["向用户展示当前基线并请求确认"]
21
+ confirm --> decision{"用户是否明确确认当前版本?"}
22
+ decision -->|"要求修订"| evidence
23
+ decision -->|"尚未确认"| wait
24
+ decision -->|"明确确认"| gate["以当前 artifact_revision 记录确认并接受阶段"]
25
+ gate --> route["按当前路线选择后续阶段;跳过决策空间构造与归并阶段也保留此确认"]
26
+ ```
27
+
28
+ ### 离开阶段的条件
29
+
30
+ - `accepted` 及明确用户确认必须绑定当前 `artifact_revision`;产物改变后重新核验并取得确认。
31
+ - `needs_user_input` 或 `blocked` 时不推进阶段游标。
32
+ - `terminated` 不代表用户撤回任务;如用户明确撤回,按交付审查与现场收尾阶段中的取消审查处理。
33
+ - 可从目标探索与需求核对阶段直接进入解决方案设计与收敛阶段,但不能绕过需求基线确认。