@pennixrv/trellis 0.7.0-beta.9 → 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 (483) 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.1.json +9 -0
  254. package/dist/templates/claude/hooks/statusline.py +0 -7
  255. package/dist/templates/codex/hooks/session-start.py +31 -38
  256. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/SKILL.md +10 -0
  257. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +40 -0
  258. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/SKILL.md +10 -0
  259. package/dist/templates/common/bundled-skills/trellis-delivery-review-and-closeout/workflow.md +55 -0
  260. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/SKILL.md +10 -0
  261. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +33 -0
  262. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +25 -25
  263. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-agents.md +1 -1
  264. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -19
  265. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  266. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +27 -75
  267. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +17 -56
  268. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  269. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/bundled-skills.md +14 -11
  270. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/generated-files.md +0 -33
  271. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +32 -0
  272. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  273. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +25 -111
  274. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +19 -60
  275. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/skills-and-commands.md +1 -1
  276. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +1 -1
  277. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
  278. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/SKILL.md +10 -0
  279. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +36 -0
  280. package/dist/templates/common/bundled-skills/trellis-task-implementation/SKILL.md +10 -0
  281. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +29 -0
  282. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +73 -0
  283. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +29 -0
  284. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +31 -0
  285. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +37 -0
  286. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +78 -0
  287. package/dist/templates/common/commands/continue.md +9 -49
  288. package/dist/templates/common/commands/finish-work.md +10 -58
  289. package/dist/templates/common/commands/start.md +19 -49
  290. package/dist/templates/common/skills/brainstorm.md +11 -199
  291. package/dist/templates/copilot/hooks/session-start.py +30 -26
  292. package/dist/templates/copilot/prompts/brainstorm.prompt.md +7 -160
  293. package/dist/templates/copilot/prompts/finish-work.prompt.md +11 -88
  294. package/dist/templates/copilot/prompts/record-session.prompt.md +4 -12
  295. package/dist/templates/copilot/prompts/start.prompt.md +12 -10
  296. package/dist/templates/dsh/DSH.md +2 -2
  297. package/dist/templates/kiro/agents/trellis.json +2 -2
  298. package/dist/templates/markdown/agents.md +14 -3
  299. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +9 -8
  300. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +1 -1
  301. package/dist/templates/markdown/workspace-index.md +0 -1
  302. package/dist/templates/omp/extensions/trellis/index.ts.txt +28 -17
  303. package/dist/templates/opencode/lib/session-utils.js +20 -25
  304. package/dist/templates/opencode/lib/trellis-context.js +4 -76
  305. package/dist/templates/opencode/plugins/inject-subagent-context.js +5 -4
  306. package/dist/templates/opencode/plugins/inject-workflow-state.js +14 -17
  307. package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -3
  308. package/dist/templates/shared-hooks/inject-subagent-context.py +445 -67
  309. package/dist/templates/shared-hooks/inject-workflow-state.py +44 -36
  310. package/dist/templates/shared-hooks/session-start.py +21 -33
  311. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +18 -0
  312. package/dist/templates/trellis/agents/teammate-profiles.json +8 -0
  313. package/dist/templates/trellis/agents/teammate.md +63 -0
  314. package/dist/templates/trellis/config.yaml +29 -38
  315. package/dist/templates/trellis/gitignore.txt +1 -0
  316. package/dist/templates/trellis/index.d.ts +8 -12
  317. package/dist/templates/trellis/index.d.ts.map +1 -1
  318. package/dist/templates/trellis/index.js +14 -25
  319. package/dist/templates/trellis/index.js.map +1 -1
  320. package/dist/templates/trellis/scripts/add_session.py +1 -1
  321. package/dist/templates/trellis/scripts/common/__init__.py +0 -1
  322. package/dist/templates/trellis/scripts/common/active_task.py +136 -100
  323. package/dist/templates/trellis/scripts/common/config.py +7 -9
  324. package/dist/templates/trellis/scripts/common/git_context.py +1 -1
  325. package/dist/templates/trellis/scripts/common/io.py +19 -0
  326. package/dist/templates/trellis/scripts/common/paths.py +0 -1
  327. package/dist/templates/trellis/scripts/common/safe_commit.py +11 -90
  328. package/dist/templates/trellis/scripts/common/session_context.py +1 -8
  329. package/dist/templates/trellis/scripts/common/spec_match.py +1 -1
  330. package/dist/templates/trellis/scripts/common/task_context.py +152 -59
  331. package/dist/templates/trellis/scripts/common/task_continuity.py +563 -0
  332. package/dist/templates/trellis/scripts/common/task_store.py +70 -548
  333. package/dist/templates/trellis/scripts/common/task_utils.py +4 -98
  334. package/dist/templates/trellis/scripts/common/task_workflow.py +1096 -0
  335. package/dist/templates/trellis/scripts/common/tasks.py +5 -8
  336. package/dist/templates/trellis/scripts/common/workflow_phase.py +8 -7
  337. package/dist/templates/trellis/scripts/hooks/linear_sync.py +3 -3
  338. package/dist/templates/trellis/scripts/task.py +114 -377
  339. package/dist/templates/trellis/workflow.md +111 -706
  340. package/dist/utils/agent-refs.d.ts +5 -5
  341. package/dist/utils/agent-refs.js +6 -6
  342. package/dist/utils/file-writer.d.ts +3 -2
  343. package/dist/utils/file-writer.d.ts.map +1 -1
  344. package/dist/utils/file-writer.js +3 -2
  345. package/dist/utils/file-writer.js.map +1 -1
  346. package/dist/utils/managed-paths.d.ts +0 -7
  347. package/dist/utils/managed-paths.d.ts.map +1 -1
  348. package/dist/utils/managed-paths.js +0 -40
  349. package/dist/utils/managed-paths.js.map +1 -1
  350. package/dist/utils/manifest-prune.d.ts.map +1 -1
  351. package/dist/utils/manifest-prune.js +2 -11
  352. package/dist/utils/manifest-prune.js.map +1 -1
  353. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  354. package/dist/utils/uninstall-scrubbers.js +3 -3
  355. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  356. package/dist/utils/workflow-resolver.d.ts +10 -16
  357. package/dist/utils/workflow-resolver.d.ts.map +1 -1
  358. package/dist/utils/workflow-resolver.js +25 -36
  359. package/dist/utils/workflow-resolver.js.map +1 -1
  360. package/package.json +2 -2
  361. package/dist/commands/channel/adapters/claude.d.ts.map +0 -1
  362. package/dist/commands/channel/adapters/claude.js.map +0 -1
  363. package/dist/commands/channel/adapters/codex.d.ts.map +0 -1
  364. package/dist/commands/channel/adapters/codex.js.map +0 -1
  365. package/dist/commands/channel/adapters/index.d.ts.map +0 -1
  366. package/dist/commands/channel/adapters/index.js.map +0 -1
  367. package/dist/commands/channel/adapters/types.d.ts.map +0 -1
  368. package/dist/commands/channel/adapters/types.js.map +0 -1
  369. package/dist/commands/channel/agent-loader.d.ts.map +0 -1
  370. package/dist/commands/channel/agent-loader.js.map +0 -1
  371. package/dist/commands/channel/context-loader.d.ts.map +0 -1
  372. package/dist/commands/channel/context-loader.js.map +0 -1
  373. package/dist/commands/channel/context-trust.d.ts.map +0 -1
  374. package/dist/commands/channel/context-trust.js.map +0 -1
  375. package/dist/commands/channel/context.d.ts +0 -16
  376. package/dist/commands/channel/context.d.ts.map +0 -1
  377. package/dist/commands/channel/context.js.map +0 -1
  378. package/dist/commands/channel/create.d.ts +0 -29
  379. package/dist/commands/channel/create.d.ts.map +0 -1
  380. package/dist/commands/channel/create.js +0 -47
  381. package/dist/commands/channel/create.js.map +0 -1
  382. package/dist/commands/channel/dev-parse-trace.d.ts.map +0 -1
  383. package/dist/commands/channel/dev-parse-trace.js.map +0 -1
  384. package/dist/commands/channel/guard.d.ts.map +0 -1
  385. package/dist/commands/channel/guard.js.map +0 -1
  386. package/dist/commands/channel/index.d.ts +0 -3
  387. package/dist/commands/channel/index.d.ts.map +0 -1
  388. package/dist/commands/channel/index.js.map +0 -1
  389. package/dist/commands/channel/interrupt.d.ts.map +0 -1
  390. package/dist/commands/channel/interrupt.js +0 -22
  391. package/dist/commands/channel/interrupt.js.map +0 -1
  392. package/dist/commands/channel/kill.d.ts +0 -7
  393. package/dist/commands/channel/kill.d.ts.map +0 -1
  394. package/dist/commands/channel/kill.js.map +0 -1
  395. package/dist/commands/channel/list.d.ts +0 -18
  396. package/dist/commands/channel/list.d.ts.map +0 -1
  397. package/dist/commands/channel/list.js.map +0 -1
  398. package/dist/commands/channel/messages.d.ts.map +0 -1
  399. package/dist/commands/channel/messages.js.map +0 -1
  400. package/dist/commands/channel/rm.d.ts +0 -27
  401. package/dist/commands/channel/rm.d.ts.map +0 -1
  402. package/dist/commands/channel/rm.js.map +0 -1
  403. package/dist/commands/channel/run.d.ts +0 -32
  404. package/dist/commands/channel/run.js +0 -141
  405. package/dist/commands/channel/run.js.map +0 -1
  406. package/dist/commands/channel/send.d.ts.map +0 -1
  407. package/dist/commands/channel/send.js.map +0 -1
  408. package/dist/commands/channel/spawn.d.ts.map +0 -1
  409. package/dist/commands/channel/spawn.js.map +0 -1
  410. package/dist/commands/channel/store/events.d.ts +0 -22
  411. package/dist/commands/channel/store/events.d.ts.map +0 -1
  412. package/dist/commands/channel/store/events.js.map +0 -1
  413. package/dist/commands/channel/store/filter.d.ts +0 -3
  414. package/dist/commands/channel/store/filter.d.ts.map +0 -1
  415. package/dist/commands/channel/store/filter.js +0 -2
  416. package/dist/commands/channel/store/filter.js.map +0 -1
  417. package/dist/commands/channel/store/lock.d.ts.map +0 -1
  418. package/dist/commands/channel/store/lock.js.map +0 -1
  419. package/dist/commands/channel/store/paths.d.ts.map +0 -1
  420. package/dist/commands/channel/store/paths.js.map +0 -1
  421. package/dist/commands/channel/store/schema.d.ts +0 -27
  422. package/dist/commands/channel/store/schema.d.ts.map +0 -1
  423. package/dist/commands/channel/store/schema.js +0 -34
  424. package/dist/commands/channel/store/schema.js.map +0 -1
  425. package/dist/commands/channel/store/thread-state.d.ts.map +0 -1
  426. package/dist/commands/channel/store/thread-state.js.map +0 -1
  427. package/dist/commands/channel/store/watch.d.ts +0 -19
  428. package/dist/commands/channel/store/watch.d.ts.map +0 -1
  429. package/dist/commands/channel/store/watch.js.map +0 -1
  430. package/dist/commands/channel/supervisor/idle.d.ts.map +0 -1
  431. package/dist/commands/channel/supervisor/idle.js.map +0 -1
  432. package/dist/commands/channel/supervisor/inbox.d.ts.map +0 -1
  433. package/dist/commands/channel/supervisor/inbox.js.map +0 -1
  434. package/dist/commands/channel/supervisor/shutdown.d.ts.map +0 -1
  435. package/dist/commands/channel/supervisor/shutdown.js.map +0 -1
  436. package/dist/commands/channel/supervisor/stdout.d.ts.map +0 -1
  437. package/dist/commands/channel/supervisor/stdout.js.map +0 -1
  438. package/dist/commands/channel/supervisor/turns.d.ts.map +0 -1
  439. package/dist/commands/channel/supervisor/turns.js.map +0 -1
  440. package/dist/commands/channel/supervisor/warning.d.ts.map +0 -1
  441. package/dist/commands/channel/supervisor/warning.js.map +0 -1
  442. package/dist/commands/channel/supervisor.d.ts.map +0 -1
  443. package/dist/commands/channel/supervisor.js.map +0 -1
  444. package/dist/commands/channel/text-body.d.ts +0 -13
  445. package/dist/commands/channel/text-body.d.ts.map +0 -1
  446. package/dist/commands/channel/text-body.js.map +0 -1
  447. package/dist/commands/channel/threads.d.ts +0 -39
  448. package/dist/commands/channel/threads.d.ts.map +0 -1
  449. package/dist/commands/channel/threads.js.map +0 -1
  450. package/dist/commands/channel/title.d.ts +0 -12
  451. package/dist/commands/channel/title.d.ts.map +0 -1
  452. package/dist/commands/channel/title.js +0 -24
  453. package/dist/commands/channel/title.js.map +0 -1
  454. package/dist/commands/channel/wait.d.ts.map +0 -1
  455. package/dist/commands/channel/wait.js.map +0 -1
  456. package/dist/commands/channel/workers.d.ts +0 -9
  457. package/dist/commands/channel/workers.d.ts.map +0 -1
  458. package/dist/commands/channel/workers.js +0 -31
  459. package/dist/commands/channel/workers.js.map +0 -1
  460. package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +0 -69
  461. package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +0 -549
  462. package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +0 -233
  463. package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +0 -237
  464. package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +0 -222
  465. package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +0 -295
  466. package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +0 -131
  467. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-channel.md +0 -70
  468. package/dist/templates/common/bundled-skills/trellis-research-record/SKILL.md +0 -14
  469. package/dist/templates/copilot/prompts/parallel.prompt.md +0 -204
  470. package/dist/templates/trellis/agents/check.md +0 -70
  471. package/dist/templates/trellis/agents/implement.md +0 -71
  472. package/dist/templates/trellis/agents/subnode.env +0 -4
  473. package/dist/templates/trellis/agents/subnode.md +0 -76
  474. package/dist/templates/trellis/scripts/common/context_projection.py +0 -508
  475. package/dist/templates/trellis/scripts/common/continuation_record.py +0 -450
  476. package/dist/templates/trellis/scripts/common/ownership_record.py +0 -439
  477. package/dist/templates/trellis/scripts/subnode_artifact.py +0 -735
  478. package/dist/templates/trellis/scripts/workspace_note.py +0 -126
  479. /package/dist/commands/{channel → teamwork}/adapters/types.js +0 -0
  480. /package/dist/commands/{channel → teamwork}/supervisor/idle.d.ts +0 -0
  481. /package/dist/commands/{channel → teamwork}/supervisor/idle.js +0 -0
  482. /package/dist/commands/{channel → teamwork}/supervisor/turns.d.ts +0 -0
  483. /package/dist/commands/{channel → teamwork}/supervisor/turns.js +0 -0
@@ -1,209 +1,21 @@
1
1
  # Trellis Brainstorm
2
2
 
3
- ## Non-Negotiable Planning Contract
3
+ Use this entry skill for a new request that needs a Trellis task. For a clear, low-risk, reversible, authorized, immediately verifiable request, follow the taskless route in workflow.md.
4
4
 
5
- A request to build, implement, fix, refactor, or "go ahead" is not approval to leave planning. Task-creation consent is also not implementation approval.
5
+ ## Start the task
6
6
 
7
- 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.
7
+ 1. Inspect only repository evidence that can change the goal, scope, acceptance criteria, constraints, or route. Ask the user when intent or a material choice remains unclear.
8
+ 2. Create a Trellis task when the work needs a persistent route, coordination, or review:
8
9
 
9
- 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.
10
+ {{PYTHON_CMD}} ./.trellis/scripts/task.py create "<title>" --description "<summary>"
10
11
 
11
- ## Analysis-Only Exception
12
+ 3. Initialize an ordered phase route that includes Goal Exploration and Requirements Confirmation Phase, then only the later phases the task needs:
12
13
 
13
- When `task.json.meta.delivery_mode = "analysis_only"` exactly and the PRD names a bounded evidence deliverable plus a no-change boundary for product source, runtime configuration, deployment, credentials, and external systems, task-creation consent authorizes that evidence work. Do not require a second planning approval or run `task.py start`: perform the declared research, audit, or design work while status remains `planning`, record the evidence, verify acceptance criteria and the boundary, commit task artifacts, and archive directly. If the evidence recommends a protected-target change, record it and create a separate change-bearing task before doing it.
14
+ {{PYTHON_CMD}} ./.trellis/scripts/task.py phase init <task> --task-kind <analysis|implementation|combined> --complexity <simple|standard|complex> --project-context <new|existing> --phase-ids <ordered-phase-ids>
14
15
 
15
- This exception is eligible only for a bounded evidence deliverable with no material user decision, design or implementation plan, cross-owner coordination, security or deployment change, release or credential action, or protected downstream task. Calling work "research", deferring source edits, or working in an audit/root repository does not make it analysis-only. If any of those conditions apply, use the normal complex planning and implementation-approval path.
16
+ 4. Load trellis-goal-exploration-and-requirements and its workflow.md. Record the current goal, scope, acceptance, constraints, evidence, and unresolved user decisions in the task artifacts.
17
+ 5. Obtain explicit user confirmation of the current requirements artifact revision before leaving Goal Exploration and Requirements Confirmation Phase. This confirmation does not approve a solution or authorize implementation.
16
18
 
17
- All other tasks follow the planning and implementation approval gates below.
19
+ Follow the active phase Skill after Goal Exploration and Requirements Confirmation Phase. Decision Space Construction and Consolidation Phase organizes material choices; Solution Design and Convergence Phase resolves decisions and accepts an analysis outcome or implementation contract. Task Implementation and Test Verification Phase requires a separate explicit authorization recorded through Trellis CLI. Delivery Review and On-Site Closeout Phase reviews delivery and controls task completion or cancellation.
18
20
 
19
- ## Non-Negotiable Evidence Rule
20
-
21
- If a question can be answered by exploring the codebase, explore the codebase instead.
22
-
23
- 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.
24
-
25
- 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.
26
-
27
- 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.
28
-
29
- ## Evidence Units For Read-Heavy Work
30
-
31
- When research, audit, review, or investigation is too large to leave one independently useful conclusion in the current bounded session, split it into evidence units. Each unit must have one question or scope, a minimal evidence range, a destination artifact, and a stop condition; write its facts, conclusion or blocker, unknowns, and recovery point before starting another unit. Size units so one normal context window can finish and persist one useful result; do not promise an exact token or time limit. Routine navigation and transient tool output do not need an artifact. Create a child task only when the unit has an independent owner, lifecycle, and acceptance contract.
32
-
33
- ---
34
-
35
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
36
-
37
- ## Preconditions
38
-
39
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
40
-
41
- If no task exists yet, create one:
42
-
43
- ```bash
44
- TASK_DIR=$({{PYTHON_CMD}} ./.trellis/scripts/task.py create "<short task title>" --description "<one-line summary>" --slug <slug>)
45
- ```
46
-
47
- 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.
48
-
49
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
50
-
51
- ## Planning Flow
52
-
53
- 1. Capture the user's request and initial known facts in `prd.md`.
54
- 2. Inspect available evidence before asking questions:
55
- - code, tests, fixtures, and configs
56
- - README files, docs, existing specs, and domain notes
57
- - related Trellis tasks, research files, and session history when present
58
- 3. Separate what you found into:
59
- - confirmed facts
60
- - product intent still needed from the user
61
- - scope or risk decisions still needed from the user
62
- - likely out-of-scope items
63
- 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. Yield only while the answer is unavailable.
64
- 5. When the host returns the current continuation's answer, immediately persist it in `prd.md` or the decision artifact, recheck evidence and conflicts, recalculate the frontier, and continue the same planning loop. Do not create a second Trellis lifecycle for the same decision chain. Stop only for a new unresolved frontier, a real capability or authority block, or a final sealed summary awaiting implementation approval.
65
- 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
66
- 7. Run the requirement convergence gate, then the PRD convergence pass. Finish with one Planning Seal closure pass.
67
- 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
68
- 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.
69
-
70
- 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.
71
-
72
- ## Question Rules
73
-
74
- 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.
75
-
76
- Each question must include:
77
-
78
- - the decision needed
79
- - why the answer matters
80
- - your recommended answer
81
- - the trade-off if the user chooses differently
82
-
83
- 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.
84
-
85
- Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
86
-
87
- 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.
88
-
89
- 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.
90
-
91
- ## Thinking Framework: First Principles Analysis
92
-
93
- When requirements are vague, solutions feel over-engineered, or you're about to add complexity "because everyone does" — decompose to fundamental truths before reasoning upward.
94
-
95
- ### Step 1: Restate the Problem
96
-
97
- Strip away implementation details to one sentence.
98
-
99
- > Bad: "We need to add Redis caching to the user profile endpoint"
100
- > Good: "User profile data takes too long to load"
101
-
102
- ### Step 2: List Fundamental Truths
103
-
104
- What is absolutely true (not opinion or convention)?
105
-
106
- | Category | Examples |
107
- |----------|----------|
108
- | **Physical constraints** | Network latency ≥ 0, disk I/O has limits |
109
- | **Business rules** | "Users must see their own data" |
110
- | **Technical invariants** | "Data must be consistent" |
111
- | **User needs** | "The user wants X within Y seconds" |
112
-
113
- ### Step 3: Challenge Assumptions
114
-
115
- For each component of the current plan:
116
-
117
- - **Fact or convention?** "We always use REST" — why?
118
- - **What if we removed this?** If nothing breaks, it's unnecessary.
119
- - **Solving the actual problem or a symptom?** Trace the causal chain.
120
- - **Who benefits from this complexity?** If "nobody", simplify.
121
-
122
- ### Step 4: Build Up from Truths
123
-
124
- 1. Start with the minimum viable mechanism satisfying all truths
125
- 2. Add complexity only when a specific truth demands it
126
- 3. Each addition must answer: "Which truth requires this?"
127
-
128
- ### Step 5: Validate
129
-
130
- - Does the solution solve the original problem?
131
- - What assumptions need verification?
132
- - What's the simplest experiment to test this?
133
-
134
- ## Requirement Convergence Gate
135
-
136
- Before final review, verify all of the following:
137
-
138
- - the user outcome and product value are explicit
139
- - in-scope and out-of-scope behavior are explicit
140
- - acceptance criteria describe observable outcomes
141
- - user-owned product, scope, UX, compatibility, and risk decisions are resolved
142
- - blocking open questions are empty
143
- - technical unknowns are researched or explicitly deferred without changing MVP behavior
144
-
145
- Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
146
-
147
- The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
148
-
149
- The Planning Seal closure pass must reconcile `task.json`, `prd.md`, `design.md`, `implement.md`, research, decision records, and manifests; verify the actual modification targets and branches, ordered dependencies and release steps, validation and rollback, dynamic-fact dispositions and replan triggers, and that every material decision has an owner and a fixed outcome. Remove static ambiguity before implementation: no `TBD`, `TODO`, `decision-needed`, unowned option, unspecified branch, open implementation path, validation gap, or conditional acceptance may remain. A material discovery invalidates the seal and returns to planning; implementation may consume only a sealed plan.
150
-
151
- ## Artifact Rules
152
-
153
- `prd.md` records requirements and acceptance:
154
-
155
- - goal and user value
156
- - confirmed facts
157
- - requirements
158
- - acceptance criteria
159
- - out of scope
160
- - open questions that still block planning
161
-
162
- `design.md` records technical design for complex tasks:
163
-
164
- - architecture and boundaries
165
- - data flow and contracts
166
- - compatibility and migration notes
167
- - important trade-offs
168
- - operational or rollback considerations
169
-
170
- `implement.md` records execution planning for complex tasks:
171
-
172
- - ordered implementation checklist
173
- - validation commands
174
- - risky files or rollback points
175
- - follow-up checks before `task.py start`
176
-
177
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start`.
178
-
179
- `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`.
180
-
181
- ## PRD Convergence Pass
182
-
183
- 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.
184
-
185
- The pass must be lossless:
186
-
187
- - Collapse repeated facts into one authoritative section.
188
- - Fold temporary brainstorm sections such as `What I already know`, `Assumptions`, and resolved `Open Questions` into Goal, Background, Requirements, Technical Notes, or Acceptance Criteria.
189
- - Remove resolved open questions instead of leaving empty or already-answered sections.
190
- - 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.
191
- - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
192
- - Do not proceed to final review while any blocking open question remains.
193
-
194
- After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
195
-
196
- ## Quality Bar
197
-
198
- Before declaring planning ready:
199
-
200
- - `prd.md` contains testable acceptance criteria.
201
- - `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.
202
- - Repository-answerable questions have already been answered through inspection.
203
- - Blocking open questions are empty.
204
- - Complex tasks have `design.md` and `implement.md`.
205
- - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
206
- - The latest final planning summary has been presented to the user.
207
- - In a subsequent message, the user explicitly approved that summary for implementation.
208
-
209
- Do not start implementation merely because the user originally asked for implementation.
21
+ Use repository evidence for facts and user input for user-owned decisions. Keep questions focused on unresolved choices, and keep artifacts limited to information needed for the route and acceptance.
@@ -257,13 +257,9 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
257
257
  if task_status == "completed":
258
258
  return (
259
259
  f"Status: COMPLETED\nTask: {task_title}\n"
260
- f"Next: Archive with `python3 ./.trellis/scripts/task.py archive {task_dir.name}` "
261
- "or start a new task."
260
+ "Next: Start another task or end the session; finish-work only records the session journal."
262
261
  )
263
262
 
264
- has_prd = (task_dir / "prd.md").is_file()
265
- has_design = (task_dir / "design.md").is_file()
266
- has_implement = (task_dir / "implement.md").is_file()
267
263
  present = [
268
264
  name
269
265
  for name in ("prd.md", "design.md", "implement.md", "implement.jsonl", "check.jsonl")
@@ -271,20 +267,18 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
271
267
  ]
272
268
  present_line = ", ".join(present) if present else "none"
273
269
 
274
- if not has_prd:
275
- return (
276
- f"Status: PLANNING\nTask: {task_title}\nPresent: {present_line}\n"
277
- "Next: Load trellis-brainstorm and write prd.md. Stay in planning."
278
- )
279
-
280
270
  if task_status == "planning":
281
- if has_design and has_implement:
282
- next_action = "Review planning artifacts with the user before `task.py start`."
283
- else:
284
- next_action = (
285
- "Lightweight task can ask for start review with PRD-only; "
286
- "complex task must add design.md and implement.md before `task.py start`."
287
- )
271
+ next_action = (
272
+ "Follow the current per-turn workflow-state. Task lifecycle status and artifact presence "
273
+ "do not identify the business phase. If no phase route is initialized, load "
274
+ "`trellis-goal-exploration-and-requirements` and confirm the requirements baseline "
275
+ "before initializing the route."
276
+ )
277
+ if any(
278
+ path.is_file() and not _has_curated_jsonl_entry(path)
279
+ for path in (task_dir / "implement.jsonl", task_dir / "check.jsonl")
280
+ ):
281
+ next_action += " Curate task context manifests only when a dispatched agent needs them."
288
282
  return (
289
283
  f"Status: PLANNING\nTask: {task_title}\nPresent: {present_line}\n"
290
284
  f"Next: {next_action}"
@@ -292,8 +286,9 @@ def _get_task_status(trellis_dir: Path, hook_input: dict) -> str:
292
286
 
293
287
  return (
294
288
  f"Status: {task_status.upper()}\nTask: {task_title}\nPresent: {present_line}\n"
295
- "Next: Follow the matching per-turn workflow-state. Context order is jsonl entries, "
296
- "prd.md, design.md if present, implement.md if present."
289
+ "Next: Follow the matching per-turn workflow-state; task lifecycle status does not "
290
+ "identify the business phase. Context order is jsonl entries, `prd.md`, `design.md` "
291
+ "if present, `implement.md` if present."
297
292
  )
298
293
 
299
294
 
@@ -424,14 +419,23 @@ def _extract_range(content: str, start_header: str, end_header: str) -> str:
424
419
  lines = content.splitlines()
425
420
  start: "int | None" = None
426
421
  end: int = len(lines)
427
- start_match = f"## {start_header}"
428
- end_match = f"## {end_header}"
422
+ start_matches = {f"## {start_header}", "## 阶段索引", "## Phase Index"}
423
+ end_matches = {
424
+ f"## {end_header}",
425
+ f"### {end_header}",
426
+ }
427
+ phase_titles = ("目标探索与需求核对阶段", "Goal Exploration and Requirements Confirmation Phase")
429
428
  for i, line in enumerate(lines):
430
429
  stripped = line.strip()
431
- if start is None and stripped == start_match:
430
+ if start is None and stripped in start_matches:
432
431
  start = i
433
432
  continue
434
- if start is not None and stripped == end_match:
433
+ heading = stripped.lstrip("#").strip()
434
+ is_phase_heading = stripped.startswith(("## ", "### ")) and any(
435
+ heading == title or heading.endswith((f":{title}", f": {title}"))
436
+ for title in phase_titles
437
+ )
438
+ if start is not None and (stripped in end_matches or is_phase_heading):
435
439
  end = i
436
440
  break
437
441
  if start is None:
@@ -479,11 +483,11 @@ def _build_workflow_toc(workflow_path: Path) -> str:
479
483
 
480
484
  out_lines = [
481
485
  "# Development Workflow - Session Summary",
482
- "Full guide: .trellis/workflow.md. Step detail: `python3 ./.trellis/scripts/get_context.py --mode phase --step <X.Y>`.",
486
+ "Full guide: .trellis/workflow.md. Phase detail: load the Skill named in the active phase breadcrumb.",
483
487
  "",
484
488
  ]
485
489
 
486
- phases = _extract_range(content, "Phase Index", "Phase 1: Plan")
490
+ phases = _extract_range(content, "阶段索引", "目标探索与需求核对阶段")
487
491
  if phases:
488
492
  out_lines.append(_strip_breadcrumb_tag_blocks(phases).rstrip())
489
493
 
@@ -1,166 +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
- ## Analysis-Only Exception
16
-
17
- When `task.json.meta.delivery_mode = "analysis_only"` exactly and the PRD names a bounded evidence deliverable plus a no-change boundary for product source, runtime configuration, deployment, credentials, and external systems, task-creation consent authorizes that evidence work. Keep status `planning`, record and verify the evidence, commit task artifacts, and archive directly; do not run `task.py start` or wait for a second implementation approval. This exception is eligible only when there is no material user decision, design or implementation plan, cross-owner coordination, security or deployment change, release or credential action, or protected downstream task. Otherwise use normal complex planning.
18
-
19
- ## Non-Negotiable Evidence Rule
20
-
21
- If a question can be answered by exploring the codebase, explore the codebase instead.
22
-
23
- 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.
24
-
25
- 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.
26
-
27
- 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.
28
-
29
- ## Evidence Units For Read-Heavy Work
30
-
31
- When research, audit, review, or investigation is too large for one independently useful conclusion in the current session, split it into evidence units. Each unit has one question or scope, a minimal evidence range, a destination artifact, and a stop condition; persist facts, conclusion or blocker, unknowns, and a recovery point before starting another unit. Size each unit for one normal context window without promising an exact token or time limit.
32
-
33
- ---
34
-
35
- Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
36
-
37
- ## Preconditions
38
-
39
- Use this skill only after task-creation consent has been given and the user is ready to enter Trellis planning.
40
-
41
- If no task exists yet, create one:
42
-
43
- ```bash
44
- TASK_DIR=$({{PYTHON_CMD}} ./.trellis/scripts/task.py create "<short task title>" --description "<one-line summary>" --slug <slug>)
45
- ```
46
-
47
- 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.
48
-
49
- `task.py create` creates the default `prd.md`. Update that file with the current understanding before asking follow-up questions.
50
-
51
- ## Planning Flow
52
-
53
- 1. Capture the user's request and initial known facts in `prd.md`.
54
- 2. Inspect available evidence before asking questions:
55
- - code, tests, fixtures, and configs
56
- - README files, docs, existing specs, and domain notes
57
- - related Trellis tasks, research files, and session history when present
58
- 3. Separate what you found into:
59
- - confirmed facts
60
- - product intent still needed from the user
61
- - scope or risk decisions still needed from the user
62
- - likely out-of-scope items
63
- 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. Yield only while the answer is unavailable.
64
- 5. When the host returns the current continuation's answer, persist it in `prd.md` or the decision artifact, recheck evidence and conflicts, recalculate the frontier, and continue the same planning loop. Stop only for a new unresolved frontier, a real capability or authority block, or a final sealed summary awaiting implementation approval.
65
- 6. When no user-owned decision remains, create or update `design.md` and `implement.md` for complex tasks.
66
- 7. Run the requirement convergence gate, then the PRD convergence pass. Finish with one Planning Seal closure pass.
67
- 8. Present the final planning summary and stop. Do not run `task.py start` or edit product code in the same turn.
68
- 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.
69
-
70
- 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.
71
-
72
- ## Question Rules
73
-
74
- 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.
75
-
76
- Each question must include:
77
-
78
- - the decision needed
79
- - why the answer matters
80
- - your recommended answer
81
- - the trade-off if the user chooses differently
82
-
83
- 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.
84
-
85
- Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
86
-
87
- 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.
88
-
89
- 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.
90
-
91
- ## Requirement Convergence Gate
92
-
93
- Before final review, verify all of the following:
94
-
95
- - the user outcome and product value are explicit
96
- - in-scope and out-of-scope behavior are explicit
97
- - acceptance criteria describe observable outcomes
98
- - user-owned product, scope, UX, compatibility, and risk decisions are resolved
99
- - blocking open questions are empty
100
- - technical unknowns are researched or explicitly deferred without changing MVP behavior
101
-
102
- Lightweight tasks may omit `design.md` and `implement.md`; they may not skip evidence inspection, requirement convergence, final review, or fresh implementation approval.
103
-
104
- The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
105
-
106
- The Planning Seal closure pass reconciles `task.json`, `prd.md`, `design.md`, `implement.md`, research, decision records, and manifests; verifies targets, branches, dependencies, release, validation, rollback, dynamic-fact dispositions, and replan triggers; and fixes every material decision to an owner and outcome. No `TBD`, `TODO`, `decision-needed`, unowned option, unspecified branch, open implementation path, validation gap, or conditional acceptance may remain. Any material discovery invalidates the seal and returns to planning.
107
-
108
- ## Artifact Rules
109
-
110
- `prd.md` records requirements and acceptance:
111
-
112
- - goal and user value
113
- - confirmed facts
114
- - requirements
115
- - acceptance criteria
116
- - out of scope
117
- - open questions that still block planning
118
-
119
- `design.md` records technical design for complex tasks:
120
-
121
- - architecture and boundaries
122
- - data flow and contracts
123
- - compatibility and migration notes
124
- - important trade-offs
125
- - operational or rollback considerations
126
-
127
- `implement.md` records execution planning for complex tasks:
128
-
129
- - ordered implementation checklist
130
- - validation commands
131
- - risky files or rollback points
132
- - follow-up checks before `task.py start`
133
-
134
- Lightweight tasks may have only `prd.md`. Complex tasks must have `prd.md`, `design.md`, and `implement.md` before `task.py start`.
135
-
136
- `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`.
137
-
138
- ## PRD Convergence Pass
139
-
140
- 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.
141
-
142
- The pass must be lossless:
143
-
144
- - Collapse repeated facts into one authoritative section.
145
- - Fold temporary brainstorm sections such as `What I already know`, `Assumptions`, and resolved `Open Questions` into Goal, Background, Requirements, Technical Notes, or Acceptance Criteria.
146
- - Remove resolved open questions instead of leaving empty or already-answered sections.
147
- - 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.
148
- - Preserve every file:line anchor, decision, constraint, requirement ID, and acceptance-criteria mapping.
149
- - Do not proceed to final review while any blocking open question remains.
150
-
151
- After the pass, read `prd.md` top to bottom and verify that no fact is repeated across sections unless the repetition adds new information.
152
-
153
- ## Quality Bar
154
-
155
- Before declaring planning ready:
156
-
157
- - `prd.md` contains testable acceptance criteria.
158
- - `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.
159
- - Repository-answerable questions have already been answered through inspection.
160
- - Blocking open questions are empty.
161
- - Complex tasks have `design.md` and `implement.md`.
162
- - Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
163
- - The latest final planning summary has been presented to the user.
164
- - In a subsequent message, the user explicitly approved that summary for implementation.
165
-
166
- 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.