@mindfoldhq/trellis 0.4.0 → 0.5.0-beta.2

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 (394) hide show
  1. package/dist/cli/index.js +0 -1
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/commands/init.d.ts +0 -1
  4. package/dist/commands/init.d.ts.map +1 -1
  5. package/dist/commands/init.js +2 -4
  6. package/dist/commands/init.js.map +1 -1
  7. package/dist/commands/update.d.ts +5 -0
  8. package/dist/commands/update.d.ts.map +1 -1
  9. package/dist/commands/update.js +100 -24
  10. package/dist/commands/update.js.map +1 -1
  11. package/dist/configurators/antigravity.d.ts +3 -4
  12. package/dist/configurators/antigravity.d.ts.map +1 -1
  13. package/dist/configurators/antigravity.js +17 -10
  14. package/dist/configurators/antigravity.js.map +1 -1
  15. package/dist/configurators/claude.d.ts +5 -28
  16. package/dist/configurators/claude.d.ts.map +1 -1
  17. package/dist/configurators/claude.js +30 -51
  18. package/dist/configurators/claude.js.map +1 -1
  19. package/dist/configurators/codebuddy.d.ts +6 -7
  20. package/dist/configurators/codebuddy.d.ts.map +1 -1
  21. package/dist/configurators/codebuddy.js +23 -51
  22. package/dist/configurators/codebuddy.js.map +1 -1
  23. package/dist/configurators/codex.d.ts +3 -6
  24. package/dist/configurators/codex.d.ts.map +1 -1
  25. package/dist/configurators/codex.js +29 -12
  26. package/dist/configurators/codex.js.map +1 -1
  27. package/dist/configurators/copilot.d.ts +6 -5
  28. package/dist/configurators/copilot.d.ts.map +1 -1
  29. package/dist/configurators/copilot.js +42 -13
  30. package/dist/configurators/copilot.js.map +1 -1
  31. package/dist/configurators/cursor.d.ts +6 -1
  32. package/dist/configurators/cursor.d.ts.map +1 -1
  33. package/dist/configurators/cursor.js +22 -45
  34. package/dist/configurators/cursor.js.map +1 -1
  35. package/dist/configurators/droid.d.ts +6 -1
  36. package/dist/configurators/droid.d.ts.map +1 -1
  37. package/dist/configurators/droid.js +23 -41
  38. package/dist/configurators/droid.js.map +1 -1
  39. package/dist/configurators/gemini.d.ts +8 -4
  40. package/dist/configurators/gemini.d.ts.map +1 -1
  41. package/dist/configurators/gemini.js +28 -47
  42. package/dist/configurators/gemini.js.map +1 -1
  43. package/dist/configurators/index.d.ts +1 -1
  44. package/dist/configurators/index.d.ts.map +1 -1
  45. package/dist/configurators/index.js +142 -98
  46. package/dist/configurators/index.js.map +1 -1
  47. package/dist/configurators/kilo.d.ts +3 -4
  48. package/dist/configurators/kilo.d.ts.map +1 -1
  49. package/dist/configurators/kilo.js +19 -46
  50. package/dist/configurators/kilo.js.map +1 -1
  51. package/dist/configurators/kiro.d.ts +4 -4
  52. package/dist/configurators/kiro.d.ts.map +1 -1
  53. package/dist/configurators/kiro.js +18 -14
  54. package/dist/configurators/kiro.js.map +1 -1
  55. package/dist/configurators/opencode.d.ts +3 -28
  56. package/dist/configurators/opencode.d.ts.map +1 -1
  57. package/dist/configurators/opencode.js +23 -48
  58. package/dist/configurators/opencode.js.map +1 -1
  59. package/dist/configurators/qoder.d.ts +6 -4
  60. package/dist/configurators/qoder.d.ts.map +1 -1
  61. package/dist/configurators/qoder.js +20 -47
  62. package/dist/configurators/qoder.js.map +1 -1
  63. package/dist/configurators/shared.d.ts +66 -3
  64. package/dist/configurators/shared.d.ts.map +1 -1
  65. package/dist/configurators/shared.js +251 -3
  66. package/dist/configurators/shared.js.map +1 -1
  67. package/dist/configurators/windsurf.d.ts +3 -4
  68. package/dist/configurators/windsurf.d.ts.map +1 -1
  69. package/dist/configurators/windsurf.js +17 -10
  70. package/dist/configurators/windsurf.js.map +1 -1
  71. package/dist/configurators/workflow.d.ts +0 -3
  72. package/dist/configurators/workflow.d.ts.map +1 -1
  73. package/dist/configurators/workflow.js +1 -7
  74. package/dist/configurators/workflow.js.map +1 -1
  75. package/dist/migrations/manifests/0.4.0.json +1 -1
  76. package/dist/migrations/manifests/0.5.0-beta.0.json +1644 -0
  77. package/dist/templates/claude/agents/check.md +2 -29
  78. package/dist/templates/claude/agents/research.md +70 -52
  79. package/dist/templates/claude/index.d.ts +5 -37
  80. package/dist/templates/claude/index.d.ts.map +1 -1
  81. package/dist/templates/claude/index.js +3 -42
  82. package/dist/templates/claude/index.js.map +1 -1
  83. package/dist/templates/claude/settings.json +3 -4
  84. package/dist/templates/{iflow → codebuddy}/agents/check.md +3 -30
  85. package/dist/templates/{iflow → codebuddy}/agents/implement.md +1 -1
  86. package/dist/templates/codebuddy/agents/research.md +138 -0
  87. package/dist/templates/codebuddy/index.d.ts +6 -16
  88. package/dist/templates/codebuddy/index.d.ts.map +1 -1
  89. package/dist/templates/codebuddy/index.js +6 -36
  90. package/dist/templates/codebuddy/index.js.map +1 -1
  91. package/dist/templates/codebuddy/settings.json +59 -0
  92. package/dist/templates/codex/agents/research.toml +50 -16
  93. package/dist/templates/codex/config.toml +10 -0
  94. package/dist/templates/codex/hooks/session-start.py +65 -29
  95. package/dist/templates/codex/hooks.json +11 -0
  96. package/dist/templates/codex/index.d.ts +0 -1
  97. package/dist/templates/codex/index.d.ts.map +1 -1
  98. package/dist/templates/codex/index.js +1 -8
  99. package/dist/templates/codex/index.js.map +1 -1
  100. package/dist/templates/common/commands/continue.md +51 -0
  101. package/dist/templates/common/commands/finish-work.md +32 -0
  102. package/dist/templates/common/commands/start.md +56 -0
  103. package/dist/templates/common/index.d.ts +28 -0
  104. package/dist/templates/common/index.d.ts.map +1 -0
  105. package/dist/templates/common/index.js +55 -0
  106. package/dist/templates/common/index.js.map +1 -0
  107. package/dist/templates/{codebuddy/commands/trellis → common/skills}/brainstorm.md +4 -4
  108. package/dist/templates/{opencode/commands/trellis → common/skills}/break-loop.md +4 -4
  109. package/dist/templates/common/skills/check.md +87 -0
  110. package/dist/templates/{codebuddy/commands/trellis → common/skills}/update-spec.md +18 -21
  111. package/dist/templates/copilot/hooks/session-start.py +65 -29
  112. package/dist/templates/copilot/hooks.json +8 -0
  113. package/dist/templates/cursor/agents/check.md +95 -0
  114. package/dist/templates/cursor/agents/implement.md +95 -0
  115. package/dist/templates/cursor/agents/research.md +138 -0
  116. package/dist/templates/cursor/hooks.json +24 -0
  117. package/dist/templates/cursor/index.d.ts +6 -17
  118. package/dist/templates/cursor/index.d.ts.map +1 -1
  119. package/dist/templates/cursor/index.js +6 -37
  120. package/dist/templates/cursor/index.js.map +1 -1
  121. package/dist/templates/droid/droids/check.md +95 -0
  122. package/dist/templates/droid/droids/implement.md +95 -0
  123. package/dist/templates/droid/droids/research.md +138 -0
  124. package/dist/templates/droid/index.d.ts +7 -19
  125. package/dist/templates/droid/index.d.ts.map +1 -1
  126. package/dist/templates/droid/index.js +7 -39
  127. package/dist/templates/droid/index.js.map +1 -1
  128. package/dist/templates/droid/settings.json +59 -0
  129. package/dist/templates/extract.d.ts +7 -193
  130. package/dist/templates/extract.d.ts.map +1 -1
  131. package/dist/templates/extract.js +7 -310
  132. package/dist/templates/extract.js.map +1 -1
  133. package/dist/templates/gemini/agents/check.md +95 -0
  134. package/dist/templates/gemini/agents/implement.md +95 -0
  135. package/dist/templates/gemini/agents/research.md +138 -0
  136. package/dist/templates/gemini/index.d.ts +6 -14
  137. package/dist/templates/gemini/index.d.ts.map +1 -1
  138. package/dist/templates/gemini/index.js +6 -37
  139. package/dist/templates/gemini/index.js.map +1 -1
  140. package/dist/templates/gemini/settings.json +28 -0
  141. package/dist/templates/kiro/agents/check.json +13 -0
  142. package/dist/templates/kiro/agents/implement.json +13 -0
  143. package/dist/templates/kiro/agents/research.json +21 -0
  144. package/dist/templates/kiro/index.d.ts +11 -11
  145. package/dist/templates/kiro/index.d.ts.map +1 -1
  146. package/dist/templates/kiro/index.js +11 -33
  147. package/dist/templates/kiro/index.js.map +1 -1
  148. package/dist/templates/opencode/agents/check.md +3 -30
  149. package/dist/templates/opencode/agents/implement.md +1 -1
  150. package/dist/templates/opencode/agents/research.md +1 -2
  151. package/dist/templates/opencode/plugins/inject-subagent-context.js +9 -183
  152. package/dist/templates/opencode/plugins/inject-workflow-state.js +160 -0
  153. package/dist/templates/opencode/plugins/session-start.js +71 -32
  154. package/dist/templates/qoder/agents/check.md +95 -0
  155. package/dist/templates/qoder/agents/implement.md +95 -0
  156. package/dist/templates/qoder/agents/research.md +138 -0
  157. package/dist/templates/qoder/index.d.ts +7 -10
  158. package/dist/templates/qoder/index.d.ts.map +1 -1
  159. package/dist/templates/qoder/index.js +7 -32
  160. package/dist/templates/qoder/index.js.map +1 -1
  161. package/dist/templates/qoder/settings.json +47 -0
  162. package/dist/templates/shared-hooks/index.d.ts +19 -0
  163. package/dist/templates/shared-hooks/index.d.ts.map +1 -0
  164. package/dist/templates/shared-hooks/index.js +30 -0
  165. package/dist/templates/shared-hooks/index.js.map +1 -0
  166. package/dist/templates/{iflow/hooks → shared-hooks}/inject-subagent-context.py +74 -263
  167. package/dist/templates/shared-hooks/inject-workflow-state.py +231 -0
  168. package/dist/templates/{claude/hooks → shared-hooks}/session-start.py +162 -55
  169. package/dist/templates/template-utils.d.ts +26 -0
  170. package/dist/templates/template-utils.d.ts.map +1 -0
  171. package/dist/templates/template-utils.js +60 -0
  172. package/dist/templates/template-utils.js.map +1 -0
  173. package/dist/templates/trellis/index.d.ts +1 -14
  174. package/dist/templates/trellis/index.d.ts.map +1 -1
  175. package/dist/templates/trellis/index.js +2 -27
  176. package/dist/templates/trellis/index.js.map +1 -1
  177. package/dist/templates/trellis/scripts/common/cli_adapter.py +2 -2
  178. package/dist/templates/trellis/scripts/common/config.py +126 -1
  179. package/dist/templates/trellis/scripts/common/git_context.py +25 -2
  180. package/dist/templates/trellis/scripts/common/task_context.py +3 -23
  181. package/dist/templates/trellis/scripts/common/task_store.py +0 -12
  182. package/dist/templates/trellis/scripts/common/workflow_phase.py +176 -0
  183. package/dist/templates/trellis/scripts/task.py +6 -35
  184. package/dist/templates/trellis/workflow.md +274 -297
  185. package/dist/types/ai-tools.d.ts +21 -3
  186. package/dist/types/ai-tools.d.ts.map +1 -1
  187. package/dist/types/ai-tools.js +106 -15
  188. package/dist/types/ai-tools.js.map +1 -1
  189. package/dist/types/migration.d.ts +8 -1
  190. package/dist/types/migration.d.ts.map +1 -1
  191. package/package.json +3 -2
  192. package/dist/configurators/iflow.d.ts +0 -33
  193. package/dist/configurators/iflow.d.ts.map +0 -1
  194. package/dist/configurators/iflow.js +0 -99
  195. package/dist/configurators/iflow.js.map +0 -1
  196. package/dist/templates/antigravity/index.d.ts +0 -12
  197. package/dist/templates/antigravity/index.d.ts.map +0 -1
  198. package/dist/templates/antigravity/index.js +0 -29
  199. package/dist/templates/antigravity/index.js.map +0 -1
  200. package/dist/templates/claude/agents/debug.md +0 -106
  201. package/dist/templates/claude/agents/dispatch.md +0 -213
  202. package/dist/templates/claude/agents/plan.md +0 -396
  203. package/dist/templates/claude/commands/trellis/brainstorm.md +0 -487
  204. package/dist/templates/claude/commands/trellis/break-loop.md +0 -125
  205. package/dist/templates/claude/commands/trellis/check-cross-layer.md +0 -153
  206. package/dist/templates/claude/commands/trellis/check.md +0 -25
  207. package/dist/templates/claude/commands/trellis/create-command.md +0 -154
  208. package/dist/templates/claude/commands/trellis/finish-work.md +0 -153
  209. package/dist/templates/claude/commands/trellis/integrate-skill.md +0 -219
  210. package/dist/templates/claude/commands/trellis/onboard.md +0 -358
  211. package/dist/templates/claude/commands/trellis/parallel.md +0 -192
  212. package/dist/templates/claude/commands/trellis/record-session.md +0 -62
  213. package/dist/templates/claude/commands/trellis/start.md +0 -393
  214. package/dist/templates/claude/commands/trellis/update-spec.md +0 -354
  215. package/dist/templates/claude/hooks/inject-subagent-context.py +0 -803
  216. package/dist/templates/claude/hooks/ralph-loop.py +0 -396
  217. package/dist/templates/codebuddy/commands/trellis/before-dev.md +0 -29
  218. package/dist/templates/codebuddy/commands/trellis/break-loop.md +0 -107
  219. package/dist/templates/codebuddy/commands/trellis/check-cross-layer.md +0 -153
  220. package/dist/templates/codebuddy/commands/trellis/check.md +0 -25
  221. package/dist/templates/codebuddy/commands/trellis/create-command.md +0 -154
  222. package/dist/templates/codebuddy/commands/trellis/finish-work.md +0 -143
  223. package/dist/templates/codebuddy/commands/trellis/integrate-skill.md +0 -219
  224. package/dist/templates/codebuddy/commands/trellis/onboard.md +0 -358
  225. package/dist/templates/codebuddy/commands/trellis/record-session.md +0 -61
  226. package/dist/templates/codebuddy/commands/trellis/start.md +0 -373
  227. package/dist/templates/codex/codex-skills/parallel/SKILL.md +0 -194
  228. package/dist/templates/cursor/commands/trellis-before-dev.md +0 -29
  229. package/dist/templates/cursor/commands/trellis-brainstorm.md +0 -487
  230. package/dist/templates/cursor/commands/trellis-break-loop.md +0 -107
  231. package/dist/templates/cursor/commands/trellis-check-cross-layer.md +0 -153
  232. package/dist/templates/cursor/commands/trellis-check.md +0 -25
  233. package/dist/templates/cursor/commands/trellis-create-command.md +0 -154
  234. package/dist/templates/cursor/commands/trellis-finish-work.md +0 -143
  235. package/dist/templates/cursor/commands/trellis-integrate-skill.md +0 -219
  236. package/dist/templates/cursor/commands/trellis-onboard.md +0 -358
  237. package/dist/templates/cursor/commands/trellis-record-session.md +0 -62
  238. package/dist/templates/cursor/commands/trellis-start.md +0 -373
  239. package/dist/templates/cursor/commands/trellis-update-spec.md +0 -354
  240. package/dist/templates/droid/commands/trellis/before-dev.md +0 -33
  241. package/dist/templates/droid/commands/trellis/brainstorm.md +0 -491
  242. package/dist/templates/droid/commands/trellis/break-loop.md +0 -111
  243. package/dist/templates/droid/commands/trellis/check-cross-layer.md +0 -157
  244. package/dist/templates/droid/commands/trellis/check.md +0 -29
  245. package/dist/templates/droid/commands/trellis/create-command.md +0 -158
  246. package/dist/templates/droid/commands/trellis/finish-work.md +0 -147
  247. package/dist/templates/droid/commands/trellis/integrate-skill.md +0 -223
  248. package/dist/templates/droid/commands/trellis/onboard.md +0 -362
  249. package/dist/templates/droid/commands/trellis/record-session.md +0 -66
  250. package/dist/templates/droid/commands/trellis/start.md +0 -377
  251. package/dist/templates/droid/commands/trellis/update-spec.md +0 -358
  252. package/dist/templates/gemini/commands/trellis/before-dev.toml +0 -33
  253. package/dist/templates/gemini/commands/trellis/brainstorm.toml +0 -435
  254. package/dist/templates/gemini/commands/trellis/break-loop.toml +0 -129
  255. package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +0 -147
  256. package/dist/templates/gemini/commands/trellis/check.toml +0 -29
  257. package/dist/templates/gemini/commands/trellis/create-command.toml +0 -119
  258. package/dist/templates/gemini/commands/trellis/finish-work.toml +0 -133
  259. package/dist/templates/gemini/commands/trellis/integrate-skill.toml +0 -104
  260. package/dist/templates/gemini/commands/trellis/onboard.toml +0 -111
  261. package/dist/templates/gemini/commands/trellis/record-session.toml +0 -66
  262. package/dist/templates/gemini/commands/trellis/start.toml +0 -354
  263. package/dist/templates/gemini/commands/trellis/update-spec.toml +0 -132
  264. package/dist/templates/iflow/agents/debug.md +0 -106
  265. package/dist/templates/iflow/agents/dispatch.md +0 -213
  266. package/dist/templates/iflow/agents/plan.md +0 -396
  267. package/dist/templates/iflow/agents/research.md +0 -120
  268. package/dist/templates/iflow/commands/trellis/before-dev.md +0 -29
  269. package/dist/templates/iflow/commands/trellis/brainstorm.md +0 -487
  270. package/dist/templates/iflow/commands/trellis/break-loop.md +0 -125
  271. package/dist/templates/iflow/commands/trellis/check-cross-layer.md +0 -153
  272. package/dist/templates/iflow/commands/trellis/check.md +0 -25
  273. package/dist/templates/iflow/commands/trellis/create-command.md +0 -152
  274. package/dist/templates/iflow/commands/trellis/finish-work.md +0 -153
  275. package/dist/templates/iflow/commands/trellis/integrate-skill.md +0 -219
  276. package/dist/templates/iflow/commands/trellis/onboard.md +0 -358
  277. package/dist/templates/iflow/commands/trellis/parallel.md +0 -192
  278. package/dist/templates/iflow/commands/trellis/record-session.md +0 -62
  279. package/dist/templates/iflow/commands/trellis/start.md +0 -393
  280. package/dist/templates/iflow/commands/trellis/update-spec.md +0 -354
  281. package/dist/templates/iflow/hooks/ralph-loop.py +0 -395
  282. package/dist/templates/iflow/hooks/session-start.py +0 -403
  283. package/dist/templates/iflow/index.d.ts +0 -54
  284. package/dist/templates/iflow/index.d.ts.map +0 -1
  285. package/dist/templates/iflow/index.js +0 -85
  286. package/dist/templates/iflow/index.js.map +0 -1
  287. package/dist/templates/iflow/settings.json +0 -60
  288. package/dist/templates/kilo/index.d.ts +0 -16
  289. package/dist/templates/kilo/index.d.ts.map +0 -1
  290. package/dist/templates/kilo/index.js +0 -39
  291. package/dist/templates/kilo/index.js.map +0 -1
  292. package/dist/templates/kilo/workflows/before-dev.md +0 -29
  293. package/dist/templates/kilo/workflows/brainstorm.md +0 -487
  294. package/dist/templates/kilo/workflows/break-loop.md +0 -125
  295. package/dist/templates/kilo/workflows/check-cross-layer.md +0 -153
  296. package/dist/templates/kilo/workflows/check.md +0 -25
  297. package/dist/templates/kilo/workflows/create-command.md +0 -152
  298. package/dist/templates/kilo/workflows/finish-work.md +0 -129
  299. package/dist/templates/kilo/workflows/integrate-skill.md +0 -219
  300. package/dist/templates/kilo/workflows/onboard.md +0 -358
  301. package/dist/templates/kilo/workflows/parallel.md +0 -193
  302. package/dist/templates/kilo/workflows/record-session.md +0 -62
  303. package/dist/templates/kilo/workflows/start.md +0 -387
  304. package/dist/templates/kilo/workflows/update-spec.md +0 -285
  305. package/dist/templates/kiro/skills/before-dev/SKILL.md +0 -34
  306. package/dist/templates/kiro/skills/brainstorm/SKILL.md +0 -492
  307. package/dist/templates/kiro/skills/break-loop/SKILL.md +0 -130
  308. package/dist/templates/kiro/skills/check/SKILL.md +0 -30
  309. package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +0 -158
  310. package/dist/templates/kiro/skills/create-command/SKILL.md +0 -101
  311. package/dist/templates/kiro/skills/finish-work/SKILL.md +0 -148
  312. package/dist/templates/kiro/skills/integrate-skill/SKILL.md +0 -221
  313. package/dist/templates/kiro/skills/onboard/SKILL.md +0 -363
  314. package/dist/templates/kiro/skills/record-session/SKILL.md +0 -67
  315. package/dist/templates/kiro/skills/start/SKILL.md +0 -351
  316. package/dist/templates/kiro/skills/update-spec/SKILL.md +0 -335
  317. package/dist/templates/opencode/agents/debug.md +0 -129
  318. package/dist/templates/opencode/agents/dispatch.md +0 -223
  319. package/dist/templates/opencode/agents/trellis-plan.md +0 -427
  320. package/dist/templates/opencode/commands/trellis/before-dev.md +0 -29
  321. package/dist/templates/opencode/commands/trellis/brainstorm.md +0 -487
  322. package/dist/templates/opencode/commands/trellis/check-cross-layer.md +0 -153
  323. package/dist/templates/opencode/commands/trellis/check.md +0 -25
  324. package/dist/templates/opencode/commands/trellis/create-command.md +0 -154
  325. package/dist/templates/opencode/commands/trellis/finish-work.md +0 -144
  326. package/dist/templates/opencode/commands/trellis/integrate-skill.md +0 -219
  327. package/dist/templates/opencode/commands/trellis/migrate-specs.md +0 -0
  328. package/dist/templates/opencode/commands/trellis/onboard.md +0 -358
  329. package/dist/templates/opencode/commands/trellis/parallel.md +0 -193
  330. package/dist/templates/opencode/commands/trellis/record-session.md +0 -62
  331. package/dist/templates/opencode/commands/trellis/start.md +0 -351
  332. package/dist/templates/opencode/commands/trellis/update-spec.md +0 -354
  333. package/dist/templates/qoder/skills/before-dev/SKILL.md +0 -34
  334. package/dist/templates/qoder/skills/brainstorm/SKILL.md +0 -492
  335. package/dist/templates/qoder/skills/break-loop/SKILL.md +0 -130
  336. package/dist/templates/qoder/skills/check/SKILL.md +0 -30
  337. package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +0 -158
  338. package/dist/templates/qoder/skills/create-command/SKILL.md +0 -101
  339. package/dist/templates/qoder/skills/finish-work/SKILL.md +0 -134
  340. package/dist/templates/qoder/skills/integrate-skill/SKILL.md +0 -221
  341. package/dist/templates/qoder/skills/onboard/SKILL.md +0 -363
  342. package/dist/templates/qoder/skills/record-session/SKILL.md +0 -67
  343. package/dist/templates/qoder/skills/start/SKILL.md +0 -388
  344. package/dist/templates/qoder/skills/update-spec/SKILL.md +0 -290
  345. package/dist/templates/trellis/scripts/common/phase.py +0 -254
  346. package/dist/templates/trellis/scripts/common/registry.py +0 -335
  347. package/dist/templates/trellis/scripts/common/worktree.py +0 -305
  348. package/dist/templates/trellis/scripts/multi_agent/__init__.py +0 -5
  349. package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +0 -17
  350. package/dist/templates/trellis/scripts/multi_agent/cleanup.py +0 -398
  351. package/dist/templates/trellis/scripts/multi_agent/create_pr.py +0 -620
  352. package/dist/templates/trellis/scripts/multi_agent/plan.py +0 -213
  353. package/dist/templates/trellis/scripts/multi_agent/start.py +0 -539
  354. package/dist/templates/trellis/scripts/multi_agent/status.py +0 -76
  355. package/dist/templates/trellis/scripts/multi_agent/status_display.py +0 -542
  356. package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +0 -225
  357. package/dist/templates/trellis/scripts-shell-archive/add-session.sh +0 -384
  358. package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +0 -129
  359. package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +0 -263
  360. package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +0 -208
  361. package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +0 -150
  362. package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +0 -247
  363. package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +0 -142
  364. package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +0 -151
  365. package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +0 -128
  366. package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +0 -299
  367. package/dist/templates/trellis/scripts-shell-archive/get-context.sh +0 -7
  368. package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +0 -15
  369. package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +0 -34
  370. package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +0 -396
  371. package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +0 -241
  372. package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +0 -207
  373. package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +0 -317
  374. package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +0 -828
  375. package/dist/templates/trellis/scripts-shell-archive/task.sh +0 -1204
  376. package/dist/templates/trellis/worktree.yaml +0 -47
  377. package/dist/templates/windsurf/index.d.ts +0 -21
  378. package/dist/templates/windsurf/index.d.ts.map +0 -1
  379. package/dist/templates/windsurf/index.js +0 -44
  380. package/dist/templates/windsurf/index.js.map +0 -1
  381. package/dist/templates/windsurf/workflows/trellis-before-dev.md +0 -31
  382. package/dist/templates/windsurf/workflows/trellis-brainstorm.md +0 -491
  383. package/dist/templates/windsurf/workflows/trellis-break-loop.md +0 -111
  384. package/dist/templates/windsurf/workflows/trellis-check-cross-layer.md +0 -157
  385. package/dist/templates/windsurf/workflows/trellis-check.md +0 -27
  386. package/dist/templates/windsurf/workflows/trellis-create-command.md +0 -154
  387. package/dist/templates/windsurf/workflows/trellis-finish-work.md +0 -147
  388. package/dist/templates/windsurf/workflows/trellis-integrate-skill.md +0 -220
  389. package/dist/templates/windsurf/workflows/trellis-onboard.md +0 -362
  390. package/dist/templates/windsurf/workflows/trellis-record-session.md +0 -66
  391. package/dist/templates/windsurf/workflows/trellis-start.md +0 -373
  392. package/dist/templates/windsurf/workflows/trellis-update-spec.md +0 -358
  393. /package/dist/templates/{claude/commands/trellis → common/skills}/before-dev.md +0 -0
  394. /package/dist/templates/{claude/hooks → shared-hooks}/statusline.py +0 -0
@@ -1,416 +1,393 @@
1
1
  # Development Workflow
2
2
 
3
- > Based on [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
4
-
5
3
  ---
6
4
 
7
- ## Table of Contents
5
+ ## Core Principles
8
6
 
9
- 1. [Quick Start (Do This First)](#quick-start-do-this-first)
10
- 2. [Workflow Overview](#workflow-overview)
11
- 3. [Session Start Process](#session-start-process)
12
- 4. [Development Process](#development-process)
13
- 5. [Session End](#session-end)
14
- 6. [File Descriptions](#file-descriptions)
15
- 7. [Best Practices](#best-practices)
7
+ 1. **Plan before code** figure out what to do before you start
8
+ 2. **Specs injected, not remembered** — guidelines are injected via hook/skill, not recalled from memory
9
+ 3. **Persist everything** — research, decisions, and lessons all go to files; conversations get compacted, files don't
10
+ 4. **Incremental development** — one task at a time
11
+ 5. **Capture learnings** — after each task, review and write new knowledge back to spec
16
12
 
17
13
  ---
18
14
 
19
- ## Quick Start (Do This First)
15
+ ## Trellis System
20
16
 
21
- ### Step 0: Initialize Developer Identity (First Time Only)
17
+ ### Developer Identity
22
18
 
23
- > **Multi-developer support**: Each developer/Agent needs to initialize their identity first
19
+ On first use, initialize your identity:
24
20
 
25
21
  ```bash
26
- # Check if already initialized
27
- python3 ./.trellis/scripts/get_developer.py
28
-
29
- # If not initialized, run:
30
22
  python3 ./.trellis/scripts/init_developer.py <your-name>
31
- # Example: python3 ./.trellis/scripts/init_developer.py cursor-agent
32
23
  ```
33
24
 
34
- This creates:
35
- - `.trellis/.developer` - Your identity file (gitignored, not committed)
36
- - `.trellis/workspace/<your-name>/` - Your personal workspace directory
25
+ Creates `.trellis/.developer` (gitignored) + `.trellis/workspace/<your-name>/`.
37
26
 
38
- **Naming suggestions**:
39
- - Human developers: Use your name, e.g., `john-doe`
40
- - Cursor AI: `cursor-agent` or `cursor-<task>`
41
- - Claude Code: `claude-agent` or `claude-<task>`
42
- - iFlow cli: `iflow-agent` or `iflow-<task>`
27
+ ### Spec System
43
28
 
44
- ### Step 1: Understand Current Context
29
+ `.trellis/spec/` holds coding guidelines organized by package and layer.
45
30
 
46
- ```bash
47
- # Get full context in one command
48
- python3 ./.trellis/scripts/get_context.py
31
+ - `.trellis/spec/<package>/<layer>/index.md` — entry point with **Pre-Development Checklist** + **Quality Check**. Actual guidelines live in the `.md` files it points to.
32
+ - `.trellis/spec/guides/index.md` cross-package thinking guides.
49
33
 
50
- # Or check manually:
51
- python3 ./.trellis/scripts/get_developer.py # Your identity
52
- python3 ./.trellis/scripts/task.py list # Active tasks
53
- git status && git log --oneline -10 # Git state
34
+ ```bash
35
+ python3 ./.trellis/scripts/get_context.py --mode packages # list packages / layers
54
36
  ```
55
37
 
56
- ### Step 2: Read Project Guidelines [MANDATORY]
38
+ **When to update spec**: new pattern/convention found · bug-fix prevention to codify · new technical decision.
39
+
40
+ ### Task System
57
41
 
58
- **CRITICAL**: Read guidelines before writing any code:
42
+ Every task has its own directory under `.trellis/tasks/{MM-DD-name}/` holding `prd.md`, `implement.jsonl`, `check.jsonl`, `task.json`, optional `research/`, `info.md`.
59
43
 
60
44
  ```bash
61
- # Discover available packages and spec layers
62
- python3 ./.trellis/scripts/get_context.py --mode packages
45
+ # Task lifecycle
46
+ python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] [--parent <dir>]
47
+ python3 ./.trellis/scripts/task.py start <name> # set as current (writes .current-task, triggers after_start hooks)
48
+ python3 ./.trellis/scripts/task.py finish # clear current task (triggers after_finish hooks)
49
+ python3 ./.trellis/scripts/task.py archive <name> # move to archive/{year-month}/
50
+ python3 ./.trellis/scripts/task.py list [--mine] [--status <s>]
51
+ python3 ./.trellis/scripts/task.py list-archive
52
+
53
+ # Code-spec context (injected into implement/check agents via JSONL)
54
+ python3 ./.trellis/scripts/task.py init-context <name> <type> # type: backend|frontend|fullstack|test|docs
55
+ python3 ./.trellis/scripts/task.py add-context <name> <action> <file> <reason>
56
+ python3 ./.trellis/scripts/task.py list-context <name> [action]
57
+ python3 ./.trellis/scripts/task.py validate <name>
58
+
59
+ # Task metadata
60
+ python3 ./.trellis/scripts/task.py set-branch <name> <branch>
61
+ python3 ./.trellis/scripts/task.py set-base-branch <name> <branch> # PR target
62
+ python3 ./.trellis/scripts/task.py set-scope <name> <scope>
63
+
64
+ # Hierarchy (parent/child)
65
+ python3 ./.trellis/scripts/task.py add-subtask <parent> <child>
66
+ python3 ./.trellis/scripts/task.py remove-subtask <parent> <child>
67
+
68
+ # PR creation
69
+ python3 ./.trellis/scripts/task.py create-pr [name] [--dry-run]
70
+ ```
63
71
 
64
- # Read the spec index for each relevant module
65
- cat .trellis/spec/<package>/<layer>/index.md
72
+ > Run `python3 ./.trellis/scripts/task.py --help` to see the authoritative, up-to-date list.
66
73
 
67
- # Always read shared guides
68
- cat .trellis/spec/guides/index.md
69
- ```
74
+ **Current-task mechanism**: `task.py start` writes the task path into `.trellis/.current-task`. Hook-capable platforms auto-inject this at session start, so the AI knows what you're working on without being told.
70
75
 
71
- **Why this matters?**
72
- - Understand which spec layers apply to your task
73
- - Know coding standards for the packages you'll modify
74
- - Learn the overall code quality requirements
76
+ ### Workspace System
75
77
 
76
- ### Step 3: Before Coding - Read Specific Guidelines (Required)
78
+ Records every AI session for cross-session tracking under `.trellis/workspace/<developer>/`.
77
79
 
78
- Based on your task, read the **detailed** guideline files listed in each spec index's **Pre-Development Checklist**:
80
+ - `journal-N.md` session log. **Max 2000 lines per file**; a new `journal-(N+1).md` is auto-created when exceeded.
81
+ - `index.md` — personal index (total sessions, last active).
79
82
 
80
83
  ```bash
81
- # The index points to specific files — read those, not just the index
82
- cat .trellis/spec/<package>/<layer>/error-handling.md
83
- cat .trellis/spec/<package>/<layer>/conventions.md
84
- # etc. — based on what the Pre-Development Checklist lists
84
+ python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash" --summary "Summary"
85
85
  ```
86
86
 
87
- ---
88
-
89
- ## Workflow Overview
87
+ ### Context Script
90
88
 
91
- ### Core Principles
89
+ ```bash
90
+ python3 ./.trellis/scripts/get_context.py # full session context
91
+ python3 ./.trellis/scripts/get_context.py --mode packages # available packages + spec layers
92
+ python3 ./.trellis/scripts/get_context.py --mode phase --step <X.Y> # detailed guide for a workflow step
93
+ ```
92
94
 
93
- 1. **Read Before Write** - Understand context before starting
94
- 2. **Follow Standards** - [!] **MUST read `.trellis/spec/` guidelines before coding**
95
- 3. **Incremental Development** - Complete one task at a time
96
- 4. **Record Promptly** - Update tracking files immediately after completion
97
- 5. **Document Limits** - [!] **Max 2000 lines per journal document**
95
+ ---
98
96
 
99
- ### File System
97
+ ## Phase Index
100
98
 
101
99
  ```
102
- .trellis/
103
- |-- .developer # Developer identity (gitignored)
104
- |-- scripts/
105
- | |-- __init__.py # Python package init
106
- | |-- common/ # Shared utilities (Python)
107
- | | |-- __init__.py
108
- | | |-- paths.py # Path utilities
109
- | | |-- developer.py # Developer management
110
- | | +-- git_context.py # Git context implementation
111
- | |-- multi_agent/ # Multi-agent pipeline scripts
112
- | | |-- __init__.py
113
- | | |-- start.py # Start worktree agent
114
- | | |-- status.py # Monitor agent status
115
- | | |-- create_pr.py # Create PR
116
- | | +-- cleanup.py # Cleanup worktree
117
- | |-- init_developer.py # Initialize developer identity
118
- | |-- get_developer.py # Get current developer name
119
- | |-- task.py # Manage tasks
120
- | |-- get_context.py # Get session context
121
- | +-- add_session.py # One-click session recording
122
- |-- workspace/ # Developer workspaces
123
- | |-- index.md # Workspace index + Session template
124
- | +-- {developer}/ # Per-developer directories
125
- | |-- index.md # Personal index (with @@@auto markers)
126
- | +-- journal-N.md # Journal files (sequential numbering)
127
- |-- tasks/ # Task tracking
128
- | +-- {MM}-{DD}-{name}/
129
- | +-- task.json
130
- |-- spec/ # [!] MUST READ before coding
131
- | |-- frontend/ # Frontend guidelines (if applicable)
132
- | | |-- index.md # Start here - guidelines index
133
- | | +-- *.md # Topic-specific docs
134
- | |-- backend/ # Backend guidelines (if applicable)
135
- | | |-- index.md # Start here - guidelines index
136
- | | +-- *.md # Topic-specific docs
137
- | +-- guides/ # Thinking guides
138
- | |-- index.md # Guides index
139
- | |-- cross-layer-thinking-guide.md # Pre-implementation checklist
140
- | +-- *.md # Other guides
141
- +-- workflow.md # This document
100
+ Phase 1: Plan → figure out what to do (brainstorm + research → prd.md)
101
+ Phase 2: Execute write code and pass quality checks
102
+ Phase 3: Finish → distill lessons + wrap-up
142
103
  ```
143
104
 
144
- ---
105
+ ### Phase 1: Plan
106
+ - 1.0 Create task `[required · once]`
107
+ - 1.1 Requirement exploration `[required · repeatable]`
108
+ - 1.2 Research `[optional · repeatable]`
109
+ - 1.3 Configure context `[required · once]` — Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid
110
+ - 1.4 Completion criteria
145
111
 
146
- ## Session Start Process
112
+ ### Phase 2: Execute
113
+ - 2.1 Implement `[required · repeatable]`
114
+ - 2.2 Quality check `[required · repeatable]`
115
+ - 2.3 Rollback `[on demand]`
147
116
 
148
- ### Step 1: Get Session Context
117
+ ### Phase 3: Finish
118
+ - 3.1 Quality verification `[required · repeatable]`
119
+ - 3.2 Debug retrospective `[on demand]`
120
+ - 3.3 Spec update `[required · once]`
121
+ - 3.4 Wrap-up reminder
149
122
 
150
- Use the unified context script:
123
+ ### Rules
151
124
 
152
- ```bash
153
- # Get all context in one command
154
- python3 ./.trellis/scripts/get_context.py
125
+ 1. Identify which Phase you're in, then continue from the next step there
126
+ 2. Run steps in order inside each Phase; `[required]` steps can't be skipped
127
+ 3. Phases can roll back (e.g., Execute reveals a prd defect → return to Plan to fix, then re-enter Execute)
128
+ 4. Steps tagged `[once]` are skipped if already done; don't re-run
155
129
 
156
- # Or get JSON format
157
- python3 ./.trellis/scripts/get_context.py --json
158
- ```
130
+ ### Skill Routing
159
131
 
160
- ### Step 2: Read Development Guidelines [!] REQUIRED
132
+ When a user request matches one of these intents, load the corresponding skill first — do not skip skills.
161
133
 
162
- **[!] CRITICAL: MUST read guidelines before writing any code**
134
+ | User intent | Skill |
135
+ |---|---|
136
+ | Wants a new feature / requirement unclear | trellis-brainstorm |
137
+ | About to write code / start implementing | trellis-before-dev |
138
+ | Finished writing / want to verify | trellis-check |
139
+ | Stuck / fixed same bug several times | trellis-break-loop |
140
+ | Spec needs update | trellis-update-spec |
163
141
 
164
- Based on what you'll develop, read the corresponding guidelines:
142
+ ### DO NOT skip skills
165
143
 
166
- ```bash
167
- # Discover available packages and spec layers
168
- python3 ./.trellis/scripts/get_context.py --mode packages
144
+ | What you're thinking | Why it's wrong |
145
+ |---|---|
146
+ | "This is simple, just code it" | Simple tasks often grow complex; before-dev takes under a minute |
147
+ | "I already thought it through in plan mode" | Plan-mode output lives in memory — sub-agents can't see it; must be persisted to prd.md |
148
+ | "I already know the spec" | The spec may have been updated since you last read it; read again |
149
+ | "Code first, check later" | `check` surfaces issues you won't notice yourself; earlier is cheaper |
150
+
151
+ ### Loading Step Detail
169
152
 
170
- # Read spec indexes for relevant modules
171
- cat .trellis/spec/<package>/<layer>/index.md
153
+ At each step, run this to fetch detailed guidance:
172
154
 
173
- # For cross-layer features
174
- cat .trellis/spec/guides/cross-layer-thinking-guide.md
155
+ ```bash
156
+ python3 ./.trellis/scripts/get_context.py --mode phase --step <step>
157
+ # e.g. python3 ./.trellis/scripts/get_context.py --mode phase --step 1.1
175
158
  ```
176
159
 
177
- ### Step 3: Select Task to Develop
160
+ ---
161
+
162
+ ## Phase 1: Plan
178
163
 
179
- Use the task management script:
164
+ Goal: figure out what to build, produce a clear requirements doc and the context needed to implement it.
180
165
 
181
- ```bash
182
- # List active tasks
183
- python3 ./.trellis/scripts/task.py list
166
+ #### 1.0 Create task `[required · once]`
184
167
 
185
- # Create new task (creates directory with task.json)
186
- python3 ./.trellis/scripts/task.py create "<title>" --slug <task-name>
168
+ Create the task directory and set it as current:
169
+
170
+ ```bash
171
+ python3 ./.trellis/scripts/task.py create "<task title>" --slug <name>
172
+ python3 ./.trellis/scripts/task.py start <task-dir>
187
173
  ```
188
174
 
189
- ---
175
+ Skip when: `.trellis/.current-task` already points to a task.
190
176
 
191
- ## Development Process
177
+ #### 1.1 Requirement exploration `[required · repeatable]`
192
178
 
193
- ### Task Development Flow
179
+ Load the `trellis-brainstorm` skill and explore requirements interactively with the user per the skill's guidance.
194
180
 
195
- ```
196
- 1. Create or select task
197
- --> python3 ./.trellis/scripts/task.py create "<title>" --slug <name> or list
181
+ The brainstorm skill will guide you to:
182
+ - Ask one question at a time
183
+ - Prefer researching over asking the user
184
+ - Prefer offering options over open-ended questions
185
+ - Update `prd.md` immediately after each user answer
198
186
 
199
- 2. Start task (mark as current)
200
- --> python3 ./.trellis/scripts/task.py start <name>
201
- --> Writes .trellis/.current-task; future sessions see it in <current-state>
187
+ Return to this step whenever requirements change and revise `prd.md`.
202
188
 
203
- 3. Write code according to guidelines
204
- --> Read .trellis/spec/ docs relevant to your task
205
- --> For cross-layer: read .trellis/spec/guides/
189
+ #### 1.2 Research `[optional · repeatable]`
206
190
 
207
- 4. Self-test
208
- --> Run project's lint/test commands (see spec docs)
209
- --> Manual feature testing
191
+ Research can happen at any time during requirement exploration. It isn't limited to local code — you can use any available tool (MCP servers, skills, web search, etc.) to look up external information, including third-party library docs, industry practices, API references, etc.
210
192
 
211
- 5. Commit code
212
- --> git add <files>
213
- --> git commit -m "type(scope): description"
214
- Format: feat/fix/docs/refactor/test/chore
193
+ [Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
215
194
 
216
- 6. Record session (one command)
217
- --> python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
195
+ Spawn the research sub-agent:
218
196
 
219
- 7. Finish task (clear current)
220
- --> python3 ./.trellis/scripts/task.py finish
221
- --> Only when the task is fully done; otherwise leave it set so the
222
- next session resumes where you left off
223
- ```
197
+ - **Agent type**: `research`
198
+ - **Task description**: Research <specific question>
199
+ - **Key requirement**: Research output MUST be persisted to `{TASK_DIR}/research/`
224
200
 
225
- ### Code Quality Checklist
201
+ [/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
226
202
 
227
- **Must pass before commit**:
228
- - [OK] Lint checks pass (project-specific command)
229
- - [OK] Type checks pass (if applicable)
230
- - [OK] Manual feature testing passes
203
+ [Kilo, Antigravity, Windsurf]
231
204
 
232
- **Project-specific checks**:
233
- - See `.trellis/spec/<package>/<layer>/quality-guidelines.md` for package-specific checks
205
+ Do the research in the main session directly and write findings into `{TASK_DIR}/research/`.
234
206
 
235
- ---
207
+ [/Kilo, Antigravity, Windsurf]
208
+
209
+ **Research artifact conventions**:
210
+ - One file per research topic (e.g. `research/auth-library-comparison.md`)
211
+ - Record third-party library usage examples, API references, version constraints in files
212
+ - Note relevant spec file paths you discovered for later reference
213
+
214
+ Brainstorm and research can interleave freely — pause to research a technical question, then return to talk with the user.
236
215
 
237
- ## Session End
216
+ **Key principle**: Research output must be written to files, not left only in the chat. Conversations get compacted; files don't.
238
217
 
239
- ### One-Click Session Recording
218
+ #### 1.3 Configure context `[required · once]`
240
219
 
241
- After code is committed, use:
220
+ [Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
221
+
222
+ Once research output is solid, initialize the agent context files:
242
223
 
243
224
  ```bash
244
- python3 ./.trellis/scripts/add_session.py \
245
- --title "Session Title" \
246
- --commit "abc1234" \
247
- --summary "Brief summary"
225
+ python3 ./.trellis/scripts/task.py init-context "$TASK_DIR" <type>
226
+ # type: backend | frontend | fullstack
248
227
  ```
249
228
 
250
- This automatically:
251
- 1. Detects current journal file
252
- 2. Creates new file if 2000-line limit exceeded
253
- 3. Appends session content
254
- 4. Updates index.md (sessions count, history table)
229
+ Skip when: `implement.jsonl` already exists.
230
+
231
+ Append any extra spec files or code patterns you find `[optional · repeatable]`:
255
232
 
256
- ### Pre-end Checklist
233
+ ```bash
234
+ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
235
+ python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
236
+ ```
257
237
 
258
- Use `/trellis:finish-work` command to run through:
259
- 1. [OK] All code committed, commit message follows convention
260
- 2. [OK] Session recorded via `add_session.py`
261
- 3. [OK] No lint/test errors
262
- 4. [OK] Working directory clean (or WIP noted)
263
- 5. [OK] Spec docs updated if needed
238
+ These jsonl files are auto-injected into sub-agent prompts during Phase 2 via hook.
239
+
240
+ [/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
241
+
242
+ [Kilo, Antigravity, Windsurf]
243
+
244
+ Skip this step. Context is loaded directly by the `trellis-before-dev` skill in Phase 2.
245
+
246
+ [/Kilo, Antigravity, Windsurf]
247
+
248
+ #### 1.4 Completion criteria
249
+
250
+ | Condition | Required |
251
+ |------|:---:|
252
+ | `prd.md` exists | ✅ |
253
+ | User confirms requirements | ✅ |
254
+ | `research/` has artifacts (complex tasks) | recommended |
255
+ | `info.md` technical design (complex tasks) | optional |
256
+
257
+ [Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
258
+
259
+ | `implement.jsonl` exists | ✅ |
260
+
261
+ [/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
264
262
 
265
263
  ---
266
264
 
267
- ## File Descriptions
265
+ ## Phase 2: Execute
268
266
 
269
- ### 1. workspace/ - Developer Workspaces
267
+ Goal: turn the prd into code that passes quality checks.
270
268
 
271
- **Purpose**: Record each AI Agent session's work content
269
+ #### 2.1 Implement `[required · repeatable]`
272
270
 
273
- **Structure** (Multi-developer support):
274
- ```
275
- workspace/
276
- |-- index.md # Main index (Active Developers table)
277
- +-- {developer}/ # Per-developer directory
278
- |-- index.md # Personal index (with @@@auto markers)
279
- +-- journal-N.md # Journal files (sequential: 1, 2, 3...)
280
- ```
271
+ [Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
281
272
 
282
- **When to update**:
283
- - [OK] End of each session
284
- - [OK] Complete important task
285
- - [OK] Fix important bug
273
+ Spawn the implement sub-agent:
286
274
 
287
- ### 2. spec/ - Development Guidelines
275
+ - **Agent type**: `implement`
276
+ - **Task description**: Implement the requirements per prd.md, consulting materials under `{TASK_DIR}/research/`; finish by running project lint and type-check
288
277
 
289
- **Purpose**: Documented standards for consistent development
278
+ The platform hook auto-handles:
279
+ - Reads `implement.jsonl` and injects the referenced spec files into the agent prompt
280
+ - Injects prd.md content
290
281
 
291
- **Structure** (Multi-doc format):
292
- ```
293
- spec/
294
- |-- frontend/ # Frontend docs (if applicable)
295
- | |-- index.md # Start here
296
- | +-- *.md # Topic-specific docs
297
- |-- backend/ # Backend docs (if applicable)
298
- | |-- index.md # Start here
299
- | +-- *.md # Topic-specific docs
300
- +-- guides/ # Thinking guides
301
- |-- index.md # Start here
302
- +-- *.md # Guide-specific docs
303
- ```
282
+ [/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
304
283
 
305
- **When to update**:
306
- - [OK] New pattern discovered
307
- - [OK] Bug fixed that reveals missing guidance
308
- - [OK] New convention established
284
+ [Kilo, Antigravity, Windsurf]
309
285
 
310
- ### 3. Tasks - Task Tracking
286
+ 1. Load the `trellis-before-dev` skill to read project guidelines
287
+ 2. Read `{TASK_DIR}/prd.md` for requirements
288
+ 3. Consult materials under `{TASK_DIR}/research/`
289
+ 4. Implement the code per requirements
290
+ 5. Run project lint and type-check
311
291
 
312
- Each task is a directory containing `task.json`:
292
+ [/Kilo, Antigravity, Windsurf]
313
293
 
314
- ```
315
- tasks/
316
- |-- 01-21-my-task/
317
- | +-- task.json
318
- +-- archive/
319
- +-- 2026-01/
320
- +-- 01-15-old-task/
321
- +-- task.json
322
- ```
294
+ #### 2.2 Quality check `[required · repeatable]`
323
295
 
324
- **Commands**:
325
- ```bash
326
- python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] # Create task directory
327
- python3 ./.trellis/scripts/task.py start <name> # Set as current task (writes .current-task, triggers after_start hooks)
328
- python3 ./.trellis/scripts/task.py finish # Clear current task (triggers after_finish hooks)
329
- python3 ./.trellis/scripts/task.py archive <name> # Archive to archive/{year-month}/
330
- python3 ./.trellis/scripts/task.py list # List active tasks
331
- python3 ./.trellis/scripts/task.py list-archive # List archived tasks
332
- ```
296
+ [Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
333
297
 
334
- **Current task mechanism**: `task.py start <name>` writes the selected task path to `.trellis/.current-task`. The SessionStart hook reads this file to inject `## CURRENT TASK` into every new session's context, so the AI immediately knows what you're working on without being told. Run `task.py finish` when you're done — subsequent sessions will show `(none)` until you start another task.
298
+ Spawn the check sub-agent:
335
299
 
336
- ---
300
+ - **Agent type**: `check`
301
+ - **Task description**: Review all code changes against spec and prd; fix any findings directly; ensure lint and type-check pass
337
302
 
338
- ## Best Practices
303
+ The check agent's job:
304
+ - Review code changes against specs
305
+ - Auto-fix issues it finds
306
+ - Run lint and typecheck to verify
339
307
 
340
- ### [OK] DO - Should Do
308
+ [/Claude Code, Cursor, OpenCode, Codex, Kiro, Gemini, Qoder, CodeBuddy, Copilot, Droid]
341
309
 
342
- 1. **Before session start**:
343
- - Run `python3 ./.trellis/scripts/get_context.py` for full context
344
- - [!] **MUST read** relevant `.trellis/spec/` docs
310
+ [Kilo, Antigravity, Windsurf]
345
311
 
346
- 2. **During development**:
347
- - [!] **Follow** `.trellis/spec/` guidelines
348
- - For cross-layer features, use `/trellis:check-cross-layer`
349
- - Develop only one task at a time
350
- - Run lint and tests frequently
312
+ Load the `trellis-check` skill and verify the code per its guidance:
313
+ - Spec compliance
314
+ - lint / type-check / tests
315
+ - Cross-layer consistency (when changes span layers)
351
316
 
352
- 3. **After development complete**:
353
- - Use `/trellis:finish-work` for completion checklist
354
- - After fix bug, use `/trellis:break-loop` for deep analysis
355
- - Human commits after testing passes
356
- - Use `add_session.py` to record progress
317
+ If issues are found → fix → re-check, until green.
357
318
 
358
- ### [X] DON'T - Should Not Do
319
+ [/Kilo, Antigravity, Windsurf]
359
320
 
360
- 1. [!] **Don't** skip reading `.trellis/spec/` guidelines
361
- 2. [!] **Don't** let journal single file exceed 2000 lines
362
- 3. **Don't** develop multiple unrelated tasks simultaneously
363
- 4. **Don't** commit code with lint/test errors
364
- 5. **Don't** forget to update spec docs after learning something
365
- 6. [!] **Don't** execute `git commit` - AI should not commit code
321
+ #### 2.3 Rollback `[on demand]`
322
+
323
+ - `check` reveals a prd defect → return to Phase 1, fix `prd.md`, then redo 2.1
324
+ - Implementation went wrong → revert code, redo 2.1
325
+ - Need more research research (same as Phase 1.2), write findings into `research/`
366
326
 
367
327
  ---
368
328
 
369
- ## Quick Reference
329
+ ## Phase 3: Finish
370
330
 
371
- ### Must-read Before Development
331
+ Goal: ensure code quality, capture lessons, record the work.
372
332
 
373
- | Task Type | Must-read Document |
374
- |-----------|-------------------|
375
- | Frontend work | `frontend/index.md` → relevant docs |
376
- | Backend work | `backend/index.md` → relevant docs |
377
- | Cross-Layer Feature | `guides/cross-layer-thinking-guide.md` |
333
+ #### 3.1 Quality verification `[required · repeatable]`
378
334
 
379
- ### Commit Convention
335
+ Load the `trellis-check` skill and do a final verification:
336
+ - Spec compliance
337
+ - lint / type-check / tests
338
+ - Cross-layer consistency (when changes span layers)
380
339
 
381
- ```bash
382
- git commit -m "type(scope): description"
383
- ```
340
+ If issues are found → fix → re-check, until green.
384
341
 
385
- **Type**: feat, fix, docs, refactor, test, chore
386
- **Scope**: Module name (e.g., auth, api, ui)
342
+ #### 3.2 Debug retrospective `[on demand]`
387
343
 
388
- ### Common Commands
344
+ If this task involved repeated debugging (the same issue was fixed multiple times), load the `trellis-break-loop` skill to:
345
+ - Classify the root cause
346
+ - Explain why earlier fixes failed
347
+ - Propose prevention
389
348
 
390
- ```bash
391
- # Session management
392
- python3 ./.trellis/scripts/get_context.py # Get full context
393
- python3 ./.trellis/scripts/add_session.py # Record session
394
-
395
- # Task management
396
- python3 ./.trellis/scripts/task.py list # List tasks
397
- python3 ./.trellis/scripts/task.py create "<title>" # Create task
398
-
399
- # Slash commands
400
- /trellis:finish-work # Pre-commit checklist
401
- /trellis:break-loop # Post-debug analysis
402
- /trellis:check-cross-layer # Cross-layer verification
403
- ```
349
+ The goal is to capture debugging lessons so the same class of issue doesn't recur.
350
+
351
+ #### 3.3 Spec update `[required · once]`
352
+
353
+ Load the `trellis-update-spec` skill and review whether this task produced new knowledge worth recording:
354
+ - Newly discovered patterns or conventions
355
+ - Pitfalls you hit
356
+ - New technical decisions
357
+
358
+ Update the docs under `.trellis/spec/` accordingly. Even if the conclusion is "nothing to update", walk through the judgment.
359
+
360
+ #### 3.4 Wrap-up reminder
361
+
362
+ After the above, remind the user they can run `/finish-work` to wrap up (archive the task, record the session).
404
363
 
405
364
  ---
406
365
 
407
- ## Summary
366
+ ## Workflow State Breadcrumbs
367
+
368
+ <!-- Injected per-turn by UserPromptSubmit hook (inject-workflow-state.py).
369
+ Edit the text inside each [workflow-state:STATUS]...[/workflow-state:STATUS]
370
+ block to customize per-task-status flow reminders. Users who fork the
371
+ Trellis workflow only need to edit this file, not the hook script.
372
+
373
+ Tag STATUS matches task.json.status. Default statuses: planning /
374
+ in_progress / completed. Add custom status blocks as needed (hyphens
375
+ and underscores allowed). Hook falls back to built-in defaults when
376
+ a status has no tag block. -->
377
+
378
+ [workflow-state:no_task]
379
+ No active task. If the user describes multi-step work, load trellis-brainstorm skill to clarify requirements and create a task via `python3 ./.trellis/scripts/task.py create`. Simple one-off questions or trivial edits don't need a task — just answer directly.
380
+ [/workflow-state:no_task]
381
+
382
+ [workflow-state:planning]
383
+ Complete prd.md via trellis-brainstorm skill; then run task.py start.
384
+ [/workflow-state:planning]
408
385
 
409
- Following this workflow ensures:
410
- - [OK] Continuity across multiple sessions
411
- - [OK] Consistent code quality
412
- - [OK] Trackable progress
413
- - [OK] Knowledge accumulation in spec docs
414
- - [OK] Transparent team collaboration
386
+ [workflow-state:in_progress]
387
+ Flow: implement check update-spec → finish
388
+ Check conversation history + git status to determine current step; do NOT skip check.
389
+ [/workflow-state:in_progress]
415
390
 
416
- **Core Philosophy**: Read before write, follow standards, record promptly, capture learnings
391
+ [workflow-state:completed]
392
+ User commits changes; then run task.py archive.
393
+ [/workflow-state:completed]