@mindfoldhq/trellis 0.6.0-beta.2 → 0.6.0-beta.20

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 (330) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/index.d.ts +1 -1
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +58 -2
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/commands/channel/adapters/claude.d.ts +29 -0
  7. package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
  8. package/dist/commands/channel/adapters/claude.js +203 -0
  9. package/dist/commands/channel/adapters/claude.js.map +1 -0
  10. package/dist/commands/channel/adapters/codex.d.ts +85 -0
  11. package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
  12. package/dist/commands/channel/adapters/codex.js +505 -0
  13. package/dist/commands/channel/adapters/codex.js.map +1 -0
  14. package/dist/commands/channel/adapters/index.d.ts +84 -0
  15. package/dist/commands/channel/adapters/index.d.ts.map +1 -0
  16. package/dist/commands/channel/adapters/index.js +115 -0
  17. package/dist/commands/channel/adapters/index.js.map +1 -0
  18. package/dist/commands/channel/adapters/types.d.ts +33 -0
  19. package/dist/commands/channel/adapters/types.d.ts.map +1 -0
  20. package/dist/commands/channel/adapters/types.js +2 -0
  21. package/dist/commands/channel/adapters/types.js.map +1 -0
  22. package/dist/commands/channel/agent-loader.d.ts +32 -0
  23. package/dist/commands/channel/agent-loader.d.ts.map +1 -0
  24. package/dist/commands/channel/agent-loader.js +154 -0
  25. package/dist/commands/channel/agent-loader.js.map +1 -0
  26. package/dist/commands/channel/context-loader.d.ts +26 -0
  27. package/dist/commands/channel/context-loader.d.ts.map +1 -0
  28. package/dist/commands/channel/context-loader.js +290 -0
  29. package/dist/commands/channel/context-loader.js.map +1 -0
  30. package/dist/commands/channel/context.d.ts +16 -0
  31. package/dist/commands/channel/context.d.ts.map +1 -0
  32. package/dist/commands/channel/context.js +83 -0
  33. package/dist/commands/channel/context.js.map +1 -0
  34. package/dist/commands/channel/create.d.ts +27 -0
  35. package/dist/commands/channel/create.d.ts.map +1 -0
  36. package/dist/commands/channel/create.js +39 -0
  37. package/dist/commands/channel/create.js.map +1 -0
  38. package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
  39. package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
  40. package/dist/commands/channel/dev-parse-trace.js +70 -0
  41. package/dist/commands/channel/dev-parse-trace.js.map +1 -0
  42. package/dist/commands/channel/guard.d.ts +150 -0
  43. package/dist/commands/channel/guard.d.ts.map +1 -0
  44. package/dist/commands/channel/guard.js +474 -0
  45. package/dist/commands/channel/guard.js.map +1 -0
  46. package/dist/commands/channel/index.d.ts +3 -0
  47. package/dist/commands/channel/index.d.ts.map +1 -0
  48. package/dist/commands/channel/index.js +531 -0
  49. package/dist/commands/channel/index.js.map +1 -0
  50. package/dist/commands/channel/interrupt.d.ts +10 -0
  51. package/dist/commands/channel/interrupt.d.ts.map +1 -0
  52. package/dist/commands/channel/interrupt.js +22 -0
  53. package/dist/commands/channel/interrupt.js.map +1 -0
  54. package/dist/commands/channel/kill.d.ts +7 -0
  55. package/dist/commands/channel/kill.d.ts.map +1 -0
  56. package/dist/commands/channel/kill.js +121 -0
  57. package/dist/commands/channel/kill.js.map +1 -0
  58. package/dist/commands/channel/list.d.ts +17 -0
  59. package/dist/commands/channel/list.d.ts.map +1 -0
  60. package/dist/commands/channel/list.js +233 -0
  61. package/dist/commands/channel/list.js.map +1 -0
  62. package/dist/commands/channel/messages.d.ts +15 -0
  63. package/dist/commands/channel/messages.d.ts.map +1 -0
  64. package/dist/commands/channel/messages.js +245 -0
  65. package/dist/commands/channel/messages.js.map +1 -0
  66. package/dist/commands/channel/rm.d.ts +27 -0
  67. package/dist/commands/channel/rm.d.ts.map +1 -0
  68. package/dist/commands/channel/rm.js +216 -0
  69. package/dist/commands/channel/rm.js.map +1 -0
  70. package/dist/commands/channel/run.d.ts +30 -0
  71. package/dist/commands/channel/run.d.ts.map +1 -0
  72. package/dist/commands/channel/run.js +130 -0
  73. package/dist/commands/channel/run.js.map +1 -0
  74. package/dist/commands/channel/send.d.ts +11 -0
  75. package/dist/commands/channel/send.d.ts.map +1 -0
  76. package/dist/commands/channel/send.js +24 -0
  77. package/dist/commands/channel/send.js.map +1 -0
  78. package/dist/commands/channel/spawn.d.ts +40 -0
  79. package/dist/commands/channel/spawn.d.ts.map +1 -0
  80. package/dist/commands/channel/spawn.js +244 -0
  81. package/dist/commands/channel/spawn.js.map +1 -0
  82. package/dist/commands/channel/store/events.d.ts +39 -0
  83. package/dist/commands/channel/store/events.d.ts.map +1 -0
  84. package/dist/commands/channel/store/events.js +87 -0
  85. package/dist/commands/channel/store/events.js.map +1 -0
  86. package/dist/commands/channel/store/filter.d.ts +3 -0
  87. package/dist/commands/channel/store/filter.d.ts.map +1 -0
  88. package/dist/commands/channel/store/filter.js +2 -0
  89. package/dist/commands/channel/store/filter.js.map +1 -0
  90. package/dist/commands/channel/store/lock.d.ts +23 -0
  91. package/dist/commands/channel/store/lock.d.ts.map +1 -0
  92. package/dist/commands/channel/store/lock.js +99 -0
  93. package/dist/commands/channel/store/lock.js.map +1 -0
  94. package/dist/commands/channel/store/paths.d.ts +63 -0
  95. package/dist/commands/channel/store/paths.d.ts.map +1 -0
  96. package/dist/commands/channel/store/paths.js +246 -0
  97. package/dist/commands/channel/store/paths.js.map +1 -0
  98. package/dist/commands/channel/store/schema.d.ts +27 -0
  99. package/dist/commands/channel/store/schema.d.ts.map +1 -0
  100. package/dist/commands/channel/store/schema.js +34 -0
  101. package/dist/commands/channel/store/schema.js.map +1 -0
  102. package/dist/commands/channel/store/thread-state.d.ts +5 -0
  103. package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
  104. package/dist/commands/channel/store/thread-state.js +16 -0
  105. package/dist/commands/channel/store/thread-state.js.map +1 -0
  106. package/dist/commands/channel/store/watch.d.ts +19 -0
  107. package/dist/commands/channel/store/watch.d.ts.map +1 -0
  108. package/dist/commands/channel/store/watch.js +146 -0
  109. package/dist/commands/channel/store/watch.js.map +1 -0
  110. package/dist/commands/channel/supervisor/idle.d.ts +46 -0
  111. package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
  112. package/dist/commands/channel/supervisor/idle.js +72 -0
  113. package/dist/commands/channel/supervisor/idle.js.map +1 -0
  114. package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
  115. package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
  116. package/dist/commands/channel/supervisor/inbox.js +160 -0
  117. package/dist/commands/channel/supervisor/inbox.js.map +1 -0
  118. package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
  119. package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
  120. package/dist/commands/channel/supervisor/shutdown.js +146 -0
  121. package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
  122. package/dist/commands/channel/supervisor/stdout.d.ts +51 -0
  123. package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
  124. package/dist/commands/channel/supervisor/stdout.js +121 -0
  125. package/dist/commands/channel/supervisor/stdout.js.map +1 -0
  126. package/dist/commands/channel/supervisor/turns.d.ts +31 -0
  127. package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
  128. package/dist/commands/channel/supervisor/turns.js +45 -0
  129. package/dist/commands/channel/supervisor/turns.js.map +1 -0
  130. package/dist/commands/channel/supervisor/warning.d.ts +48 -0
  131. package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
  132. package/dist/commands/channel/supervisor/warning.js +77 -0
  133. package/dist/commands/channel/supervisor/warning.js.map +1 -0
  134. package/dist/commands/channel/supervisor.d.ts +59 -0
  135. package/dist/commands/channel/supervisor.d.ts.map +1 -0
  136. package/dist/commands/channel/supervisor.js +344 -0
  137. package/dist/commands/channel/supervisor.js.map +1 -0
  138. package/dist/commands/channel/text-body.d.ts +13 -0
  139. package/dist/commands/channel/text-body.d.ts.map +1 -0
  140. package/dist/commands/channel/text-body.js +47 -0
  141. package/dist/commands/channel/text-body.js.map +1 -0
  142. package/dist/commands/channel/threads.d.ts +39 -0
  143. package/dist/commands/channel/threads.d.ts.map +1 -0
  144. package/dist/commands/channel/threads.js +106 -0
  145. package/dist/commands/channel/threads.js.map +1 -0
  146. package/dist/commands/channel/title.d.ts +12 -0
  147. package/dist/commands/channel/title.d.ts.map +1 -0
  148. package/dist/commands/channel/title.js +24 -0
  149. package/dist/commands/channel/title.js.map +1 -0
  150. package/dist/commands/channel/wait.d.ts +17 -0
  151. package/dist/commands/channel/wait.d.ts.map +1 -0
  152. package/dist/commands/channel/wait.js +75 -0
  153. package/dist/commands/channel/wait.js.map +1 -0
  154. package/dist/commands/init.d.ts +2 -0
  155. package/dist/commands/init.d.ts.map +1 -1
  156. package/dist/commands/init.js +97 -42
  157. package/dist/commands/init.js.map +1 -1
  158. package/dist/commands/mem.d.ts +13 -117
  159. package/dist/commands/mem.d.ts.map +1 -1
  160. package/dist/commands/mem.js +168 -1074
  161. package/dist/commands/mem.js.map +1 -1
  162. package/dist/commands/uninstall.d.ts.map +1 -1
  163. package/dist/commands/uninstall.js +28 -2
  164. package/dist/commands/uninstall.js.map +1 -1
  165. package/dist/commands/update.d.ts.map +1 -1
  166. package/dist/commands/update.js +31 -111
  167. package/dist/commands/update.js.map +1 -1
  168. package/dist/commands/upgrade.d.ts +28 -0
  169. package/dist/commands/upgrade.d.ts.map +1 -0
  170. package/dist/commands/upgrade.js +84 -0
  171. package/dist/commands/upgrade.js.map +1 -0
  172. package/dist/commands/workflow.d.ts +35 -0
  173. package/dist/commands/workflow.d.ts.map +1 -0
  174. package/dist/commands/workflow.js +219 -0
  175. package/dist/commands/workflow.js.map +1 -0
  176. package/dist/configurators/claude.d.ts.map +1 -1
  177. package/dist/configurators/claude.js +1 -0
  178. package/dist/configurators/claude.js.map +1 -1
  179. package/dist/configurators/codex.d.ts.map +1 -1
  180. package/dist/configurators/codex.js +5 -3
  181. package/dist/configurators/codex.js.map +1 -1
  182. package/dist/configurators/shared.js +4 -4
  183. package/dist/configurators/shared.js.map +1 -1
  184. package/dist/configurators/workflow.d.ts +8 -0
  185. package/dist/configurators/workflow.d.ts.map +1 -1
  186. package/dist/configurators/workflow.js +3 -2
  187. package/dist/configurators/workflow.js.map +1 -1
  188. package/dist/migrations/manifests/0.5.10.json +9 -0
  189. package/dist/migrations/manifests/0.5.11.json +16 -0
  190. package/dist/migrations/manifests/0.5.12.json +9 -0
  191. package/dist/migrations/manifests/0.5.13.json +9 -0
  192. package/dist/migrations/manifests/0.5.14.json +9 -0
  193. package/dist/migrations/manifests/0.5.15.json +9 -0
  194. package/dist/migrations/manifests/0.5.16.json +9 -0
  195. package/dist/migrations/manifests/0.5.17.json +9 -0
  196. package/dist/migrations/manifests/0.5.18.json +9 -0
  197. package/dist/migrations/manifests/0.6.0-beta.10.json +9 -0
  198. package/dist/migrations/manifests/0.6.0-beta.11.json +9 -0
  199. package/dist/migrations/manifests/0.6.0-beta.12.json +9 -0
  200. package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
  201. package/dist/migrations/manifests/0.6.0-beta.14.json +9 -0
  202. package/dist/migrations/manifests/0.6.0-beta.15.json +9 -0
  203. package/dist/migrations/manifests/0.6.0-beta.16.json +9 -0
  204. package/dist/migrations/manifests/0.6.0-beta.17.json +9 -0
  205. package/dist/migrations/manifests/0.6.0-beta.18.json +16 -0
  206. package/dist/migrations/manifests/0.6.0-beta.19.json +9 -0
  207. package/dist/migrations/manifests/0.6.0-beta.20.json +9 -0
  208. package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
  209. package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
  210. package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
  211. package/dist/migrations/manifests/0.6.0-beta.6.json +16 -0
  212. package/dist/migrations/manifests/0.6.0-beta.7.json +9 -0
  213. package/dist/migrations/manifests/0.6.0-beta.8.json +9 -0
  214. package/dist/migrations/manifests/0.6.0-beta.9.json +9 -0
  215. package/dist/templates/claude/agents/trellis-check.md +13 -7
  216. package/dist/templates/claude/agents/trellis-implement.md +8 -7
  217. package/dist/templates/claude/settings.json +4 -4
  218. package/dist/templates/codebuddy/agents/trellis-check.md +13 -7
  219. package/dist/templates/codebuddy/agents/trellis-implement.md +8 -7
  220. package/dist/templates/codebuddy/settings.json +4 -4
  221. package/dist/templates/codex/agents/trellis-check.toml +4 -4
  222. package/dist/templates/codex/agents/trellis-implement.toml +4 -4
  223. package/dist/templates/codex/config.toml +5 -3
  224. package/dist/templates/codex/hooks/session-start.py +205 -119
  225. package/dist/templates/codex/hooks.json +2 -2
  226. package/dist/templates/codex/skills/before-dev/SKILL.md +12 -6
  227. package/dist/templates/codex/skills/brainstorm/SKILL.md +69 -457
  228. package/dist/templates/codex/skills/check/SKILL.md +86 -18
  229. package/dist/templates/codex/skills/start/SKILL.md +33 -323
  230. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +7 -4
  231. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  232. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +3 -2
  233. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +5 -5
  234. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  235. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +35 -6
  236. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +5 -4
  237. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/SKILL.md +41 -0
  238. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/mcp-setup.md +90 -0
  239. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/repository-analysis.md +59 -0
  240. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-task-planning.md +61 -0
  241. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-writing.md +70 -0
  242. package/dist/templates/common/commands/continue.md +6 -5
  243. package/dist/templates/common/commands/start.md +9 -6
  244. package/dist/templates/common/skills/before-dev.md +12 -6
  245. package/dist/templates/common/skills/brainstorm.md +68 -504
  246. package/dist/templates/common/skills/check.md +7 -1
  247. package/dist/templates/copilot/hooks/session-start.py +219 -101
  248. package/dist/templates/copilot/hooks.json +2 -2
  249. package/dist/templates/copilot/prompts/before-dev.prompt.md +12 -6
  250. package/dist/templates/copilot/prompts/brainstorm.prompt.md +69 -457
  251. package/dist/templates/copilot/prompts/check.prompt.md +86 -18
  252. package/dist/templates/copilot/prompts/parallel.prompt.md +16 -8
  253. package/dist/templates/copilot/prompts/start.prompt.md +33 -367
  254. package/dist/templates/cursor/agents/trellis-check.md +13 -7
  255. package/dist/templates/cursor/agents/trellis-implement.md +8 -7
  256. package/dist/templates/cursor/hooks.json +1 -7
  257. package/dist/templates/droid/droids/trellis-check.md +13 -7
  258. package/dist/templates/droid/droids/trellis-implement.md +8 -7
  259. package/dist/templates/droid/settings.json +4 -4
  260. package/dist/templates/gemini/agents/trellis-check.md +11 -5
  261. package/dist/templates/gemini/agents/trellis-implement.md +7 -6
  262. package/dist/templates/gemini/settings.json +2 -2
  263. package/dist/templates/kiro/agents/trellis-check.json +1 -1
  264. package/dist/templates/kiro/agents/trellis-implement.json +1 -1
  265. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +127 -9
  266. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +171 -6
  267. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +333 -43
  268. package/dist/templates/markdown/spec/guides/index.md.txt +18 -0
  269. package/dist/templates/opencode/agents/trellis-check.md +13 -7
  270. package/dist/templates/opencode/agents/trellis-implement.md +9 -8
  271. package/dist/templates/opencode/lib/session-utils.js +212 -123
  272. package/dist/templates/opencode/lib/trellis-context.js +73 -11
  273. package/dist/templates/opencode/plugins/inject-subagent-context.js +131 -29
  274. package/dist/templates/opencode/plugins/inject-workflow-state.js +9 -5
  275. package/dist/templates/opencode/plugins/session-start.js +9 -1
  276. package/dist/templates/pi/agents/trellis-check.md +5 -4
  277. package/dist/templates/pi/agents/trellis-implement.md +5 -4
  278. package/dist/templates/pi/extensions/trellis/index.ts.txt +1357 -754
  279. package/dist/templates/qoder/agents/trellis-check.md +11 -5
  280. package/dist/templates/qoder/agents/trellis-implement.md +7 -6
  281. package/dist/templates/qoder/settings.json +4 -4
  282. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  283. package/dist/templates/shared-hooks/index.js +0 -1
  284. package/dist/templates/shared-hooks/index.js.map +1 -1
  285. package/dist/templates/shared-hooks/inject-subagent-context.py +36 -14
  286. package/dist/templates/shared-hooks/inject-workflow-state.py +40 -42
  287. package/dist/templates/shared-hooks/session-start.py +222 -171
  288. package/dist/templates/trellis/config.yaml +38 -0
  289. package/dist/templates/trellis/index.d.ts +1 -0
  290. package/dist/templates/trellis/index.d.ts.map +1 -1
  291. package/dist/templates/trellis/index.js +2 -0
  292. package/dist/templates/trellis/index.js.map +1 -1
  293. package/dist/templates/trellis/scripts/add_session.py +50 -24
  294. package/dist/templates/trellis/scripts/common/config.py +57 -1
  295. package/dist/templates/trellis/scripts/common/safe_commit.py +285 -0
  296. package/dist/templates/trellis/scripts/common/session_context.py +384 -137
  297. package/dist/templates/trellis/scripts/common/task_context.py +3 -3
  298. package/dist/templates/trellis/scripts/common/task_store.py +161 -15
  299. package/dist/templates/trellis/scripts/common/workflow_phase.py +7 -10
  300. package/dist/templates/trellis/scripts/task.py +3 -3
  301. package/dist/templates/trellis/workflow.md +119 -98
  302. package/dist/utils/cwd-guard.d.ts +38 -0
  303. package/dist/utils/cwd-guard.d.ts.map +1 -0
  304. package/dist/utils/cwd-guard.js +62 -0
  305. package/dist/utils/cwd-guard.js.map +1 -0
  306. package/dist/utils/file-writer.d.ts +13 -0
  307. package/dist/utils/file-writer.d.ts.map +1 -1
  308. package/dist/utils/file-writer.js +59 -1
  309. package/dist/utils/file-writer.js.map +1 -1
  310. package/dist/utils/manifest-prune.d.ts +61 -0
  311. package/dist/utils/manifest-prune.d.ts.map +1 -0
  312. package/dist/utils/manifest-prune.js +136 -0
  313. package/dist/utils/manifest-prune.js.map +1 -0
  314. package/dist/utils/task-json.d.ts +9 -42
  315. package/dist/utils/task-json.d.ts.map +1 -1
  316. package/dist/utils/task-json.js +8 -45
  317. package/dist/utils/task-json.js.map +1 -1
  318. package/dist/utils/template-hash.d.ts +32 -6
  319. package/dist/utils/template-hash.d.ts.map +1 -1
  320. package/dist/utils/template-hash.js +53 -31
  321. package/dist/utils/template-hash.js.map +1 -1
  322. package/dist/utils/uninstall-scrubbers.d.ts +1 -0
  323. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  324. package/dist/utils/uninstall-scrubbers.js +21 -0
  325. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  326. package/dist/utils/workflow-resolver.d.ts +86 -0
  327. package/dist/utils/workflow-resolver.d.ts.map +1 -0
  328. package/dist/utils/workflow-resolver.js +265 -0
  329. package/dist/utils/workflow-resolver.js.map +1 -0
  330. package/package.json +9 -8
@@ -5,350 +5,60 @@ description: "Initializes an AI development session by reading workflow guides,
5
5
 
6
6
  # Start Session
7
7
 
8
- Initialize your AI development session and begin working on tasks.
8
+ Initialize a Trellis-managed development session. This platform has no active session-start hook, so manually load the equivalent compact context by following these steps.
9
9
 
10
10
  ---
11
11
 
12
- ## Operation Types
13
-
14
- | Marker | Meaning | Executor |
15
- |--------|---------|----------|
16
- | `[AI]` | Bash scripts or tool calls executed by AI | You (AI) |
17
- | `[USER]` | Skills executed by user | User |
18
-
19
- ---
20
-
21
- ## Initialization `[AI]`
22
-
23
- ### Step 1: Understand Development Workflow
24
-
25
- First, read the workflow guide to understand the development process:
26
-
27
- ```bash
28
- cat .trellis/workflow.md
29
- ```
30
-
31
- **Follow the instructions in workflow.md** - it contains:
32
- - Core principles (Read Before Write, Follow Standards, etc.)
33
- - File system structure
34
- - Development process
35
- - Best practices
36
-
37
- ### Step 2: Get Current Context
38
-
39
- ```bash
40
- python3 ./.trellis/scripts/get_context.py
41
- ```
42
-
43
- This shows: developer identity, git status, current task (if any), active tasks.
44
-
45
- ### Step 3: Read Guidelines Index
46
-
47
- ```bash
48
- python3 ./.trellis/scripts/get_context.py --mode packages
49
- ```
50
-
51
- This shows available packages and their spec layers. Read the relevant spec indexes:
52
-
53
- ```bash
54
- cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
55
- cat .trellis/spec/guides/index.md # Thinking guides (always read)
56
- ```
57
-
58
- > **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
59
- > At this step, just read the indexes to understand what's available.
60
- > When you start actual development, you MUST go back and read the specific guideline files relevant to your task, as listed in the index's Pre-Development Checklist.
61
-
62
- ### Step 4: Report and Ask
63
-
64
- Report what you learned and ask: "What would you like to work on?"
65
-
66
- ---
67
-
68
- ## Task Classification
69
-
70
- When user describes a task, classify it:
71
-
72
- | Type | Criteria | Workflow |
73
- |------|----------|----------|
74
- | **Question** | User asks about code, architecture, or how something works | Answer directly |
75
- | **Trivial Fix** | Typo fix, comment update, single-line change, < 5 minutes | Direct Edit |
76
- | **Simple Task** | Clear goal, 1-2 files, well-defined scope | Quick confirm → Task Workflow |
77
- | **Complex Task** | Vague goal, multiple files, architectural decisions | **Brainstorm → Task Workflow** |
78
-
79
- ### Decision Rule
80
-
81
- > **If in doubt, use Brainstorm + Task Workflow.**
82
- >
83
- > Task Workflow ensures code-specs are injected to the right context, resulting in higher quality code.
84
- > The overhead is minimal, but the benefit is significant.
85
-
86
- > **Subtask Decomposition**: If brainstorm reveals multiple independent work items,
87
- > consider creating subtasks using `--parent` flag or `add-subtask` command.
88
- > See the brainstorm skill's Step 8 for details.
89
-
90
- ---
91
-
92
- ## Question / Trivial Fix
93
-
94
- For questions or trivial fixes, work directly:
95
-
96
- 1. Answer question or make the fix
97
- 2. If code was changed, remind user to run `$finish-work`
98
-
99
- ---
100
-
101
- ## Simple Task
102
-
103
- For simple, well-defined tasks:
104
-
105
- 1. Quick confirm: "I understand you want to [goal]. Shall I proceed?"
106
- 2. If no, clarify and confirm again
107
- 3. **If yes: execute ALL steps below without stopping. Do NOT ask for additional confirmation between steps.**
108
- - Create task directory (Phase 1 Path B, Step 2)
109
- - Write PRD (Step 3)
110
- - Research codebase (Phase 2, Step 5)
111
- - Configure context (Step 6)
112
- - Activate task (Step 7)
113
- - Implement (Phase 3, Step 8)
114
- - Check quality (Step 9)
115
- - Complete (Step 10)
116
-
117
- ---
118
-
119
- ## Complex Task - Brainstorm First
120
-
121
- For complex or vague tasks, **automatically start the brainstorm process** — do NOT skip directly to implementation.
122
-
123
- See `$brainstorm` for the full process. Summary:
124
-
125
- 1. **Acknowledge and classify** - State your understanding
126
- 2. **Create task directory** - Track evolving requirements in `prd.md`
127
- 3. **Ask questions one at a time** - Update PRD after each answer
128
- 4. **Propose approaches** - For architectural decisions
129
- 5. **Confirm final requirements** - Get explicit approval
130
- 6. **Proceed to Task Workflow** - With clear requirements in PRD
131
-
132
- ---
133
-
134
- ## Task Workflow (Development Tasks)
135
-
136
- **Why this workflow?**
137
- - Run a dedicated research pass before coding
138
- - Configure specs in jsonl context files
139
- - Implement using injected context
140
- - Verify with a separate check pass
141
- - Result: Code that follows project conventions automatically
142
-
143
- ### Overview: Two Entry Points
144
-
145
- ```
146
- From Brainstorm (Complex Task):
147
- PRD confirmed → Research → Configure Context → Activate → Implement → Check → Complete
148
-
149
- From Simple Task:
150
- Confirm → Create Task → Write PRD → Research → Configure Context → Activate → Implement → Check → Complete
151
- ```
152
-
153
- **Key principle: Research happens AFTER requirements are clear (PRD exists).**
154
-
155
- ---
156
-
157
- ### Phase 1: Establish Requirements
158
-
159
- #### Path A: From Brainstorm (skip to Phase 2)
160
-
161
- PRD and task directory already exist from brainstorm. Skip directly to Phase 2.
162
-
163
- #### Path B: From Simple Task
164
-
165
- **Step 1: Confirm Understanding** `[AI]`
166
-
167
- Quick confirm:
168
- - What is the goal?
169
- - What type of development? (frontend / backend / fullstack)
170
- - Any specific requirements or constraints?
171
-
172
- If unclear, ask clarifying questions.
173
-
174
- **Step 2: Create Task Directory** `[AI]`
12
+ ## Step 1: Current state
13
+ Identity, git status, current task, active tasks, journal location.
175
14
 
176
15
  ```bash
177
- TASK_DIR=$(python3 ./.trellis/scripts/task.py create "<title>" --slug <name>)
16
+ {{PYTHON_CMD}} ./.trellis/scripts/get_context.py
178
17
  ```
179
18
 
180
- **Step 3: Write PRD** `[AI]`
181
-
182
- Create `prd.md` in the task directory with:
183
-
184
- ```markdown
185
- # <Task Title>
186
-
187
- ## Goal
188
- <What we're trying to achieve>
189
-
190
- ## Requirements
191
- - <Requirement 1>
192
- - <Requirement 2>
193
-
194
- ## Acceptance Criteria
195
- - [ ] <Criterion 1>
196
- - [ ] <Criterion 2>
197
-
198
- ## Technical Notes
199
- <Any technical decisions or constraints>
200
- ```
19
+ If this output includes a line beginning `Trellis update available:`, copy the full line verbatim when summarizing session context. Do not shorten operational command hints.
201
20
 
202
- ---
203
-
204
- ### Phase 2: Prepare for Implementation (shared)
205
-
206
- > Both paths converge here. PRD and task directory must exist before proceeding.
207
-
208
- **Step 4: Code-Spec Depth Check** `[AI]`
209
-
210
- If the task touches infra or cross-layer contracts, do not start implementation until code-spec depth is defined.
211
-
212
- Trigger this requirement when the change includes any of:
213
- - New or changed command/API signatures
214
- - Database schema or migration changes
215
- - Infra integrations (storage, queue, cache, secrets, env contracts)
216
- - Cross-layer payload transformations
217
-
218
- Must-have before proceeding:
219
- - [ ] Target code-spec files to update are identified
220
- - [ ] Concrete contract is defined (signature, fields, env keys)
221
- - [ ] Validation and error matrix is defined
222
- - [ ] At least one Good/Base/Bad case is defined
223
-
224
- **Step 5: Research the Codebase** `[AI]`
225
-
226
- Based on the confirmed PRD, run a focused research pass and produce:
227
-
228
- 1. Relevant spec files in `.trellis/spec/`
229
- 2. Existing code patterns to follow (2-3 examples)
230
- 3. Files that will likely need modification
231
-
232
- Use this output format:
233
-
234
- ```markdown
235
- ## Relevant Specs
236
- - <path>: <why it's relevant>
237
-
238
- ## Code Patterns Found
239
- - <pattern>: <example file path>
240
-
241
- ## Files to Modify
242
- - <path>: <what change>
243
- ```
244
-
245
- **Step 6: Configure Context** `[AI]`
246
-
247
- `implement.jsonl` and `check.jsonl` were seeded on `task.py create` with a single self-describing `_example` line. Curate real entries now (see workflow.md Phase 1.3 for the full rule):
248
-
249
- - Put **spec files** (`.trellis/spec/<package>/<layer>/*.md`) and **research files** (`{TASK_DIR}/research/*.md`) only.
250
- - Do NOT put code files (`src/**`, `packages/**`) — those are read during implementation, not pre-registered here.
251
- - Split: `implement.jsonl` = specs the implement sub-agent needs; `check.jsonl` = specs the check sub-agent needs.
252
-
253
- Discover available specs:
21
+ ## Step 2: Workflow overview
22
+ Compact Phase Index, request triage rules, planning artifact contract, and the step-detail command.
254
23
 
255
24
  ```bash
256
- python3 ./.trellis/scripts/get_context.py --mode packages
25
+ {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase
257
26
  ```
258
27
 
259
- Append entries (either edit the jsonl file directly, or):
28
+ Full guide in `.trellis/workflow.md` (read on demand).
260
29
 
261
- ```bash
262
- python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" implement "<path>" "<reason>"
263
- python3 ./.trellis/scripts/task.py add-context "$TASK_DIR" check "<path>" "<reason>"
264
- ```
265
-
266
- **Step 7: Activate Task** `[AI]`
30
+ ## Step 3: Guideline indexes
31
+ Discover packages + spec layers, then read each relevant index file.
267
32
 
268
33
  ```bash
269
- python3 ./.trellis/scripts/task.py start "$TASK_DIR"
34
+ {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode packages
35
+ cat .trellis/spec/guides/index.md
36
+ cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
270
37
  ```
271
38
 
272
- This sets the active task through Trellis' session resolver so hooks can inject context for this AI session. If the command fails because no session identity is available, rerun it from an IDE/session that exposes session identity or set `TRELLIS_CONTEXT_ID`.
273
-
274
- ---
275
-
276
- ### Phase 3: Execute (shared)
277
-
278
- **Step 8: Implement** `[AI]`
279
-
280
- Implement the task described in `prd.md`.
281
-
282
- - Follow all specs injected into implement context
283
- - Keep changes scoped to requirements
284
- - Run lint and typecheck before finishing
285
-
286
- **Step 9: Check Quality** `[AI]`
287
-
288
- Run a quality pass against check context:
39
+ Index files list the specific guideline docs to read when you actually start coding.
289
40
 
290
- - Review all code changes against the specs
291
- - Fix issues directly
292
- - Ensure lint and typecheck pass
41
+ ## Step 4: Decide next action
42
+ From Step 1 you know the current task and status. Check the task directory:
293
43
 
294
- **Step 10: Complete** `[AI]`
295
-
296
- 1. Verify lint and typecheck pass
297
- 2. Report what was implemented
298
- 3. Remind user to:
299
- - Test the changes
300
- - Commit when ready
301
- - Run `$record-session` to record this session
302
-
303
- ---
304
-
305
- ## Continuing Existing Task
306
-
307
- If `get_context.py` shows a current task:
308
-
309
- 1. Read the task's `prd.md` to understand the goal
310
- 2. Check `task.json` for current status and phase
311
- 3. Ask user: "Continue working on <task-name>?"
312
-
313
- If yes, resume from the appropriate step (usually Step 7 or 8).
44
+ - **Active task status `planning` + no `prd.md`** → Phase 1.1. Load the `trellis-brainstorm` skill.
45
+ - **Active task status `planning` + `prd.md` exists** → stay in Phase 1. Lightweight tasks can be PRD-only; complex tasks need `design.md` + `implement.md`. Load the relevant Phase 1 step detail before `task.py start`.
46
+ - **Active task status `in_progress`** → Phase 2 step 2.1. Load the step detail:
47
+ ```bash
48
+ {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase --step 2.1 --platform {{CLI_FLAG}}
49
+ ```
50
+ - **No active task** → classify first. For simple conversation / small task, ask only whether this turn should create a Trellis task. For complex work, ask whether you may create a Trellis task and enter planning. If the user says no, skip Trellis for this session.
314
51
 
315
52
  ---
316
53
 
317
- ## Skills Reference
318
-
319
- ### User Skills `[USER]`
320
-
321
- | Skill | When to Use |
322
- |---------|-------------|
323
- | `$start` | Begin a session (this skill) |
324
- | `$finish-work` | Before committing changes |
325
- | `$record-session` | After completing a task |
326
-
327
- ### AI Scripts `[AI]`
328
-
329
- | Script | Purpose |
330
- |--------|---------|
331
- | `python3 ./.trellis/scripts/get_context.py` | Get session context |
332
- | `python3 ./.trellis/scripts/task.py create` | Create task directory (seeds jsonl on sub-agent platforms) |
333
- | `python3 ./.trellis/scripts/task.py add-context` | Append spec/research entry to jsonl |
334
- | `python3 ./.trellis/scripts/task.py start` | Set current task |
335
- | `python3 ./.trellis/scripts/task.py finish` | Clear current task |
336
- | `python3 ./.trellis/scripts/task.py archive` | Archive completed task |
337
-
338
- ### Workflow Phases `[AI]`
339
-
340
- | Phase | Purpose | Context Source |
341
- |-------|---------|----------------|
342
- | research | Analyze codebase | direct repo inspection |
343
- | implement | Write code | `implement.jsonl` |
344
- | check | Review & fix | `check.jsonl` |
345
- | debug | Fix specific issues | `debug.jsonl` |
346
-
347
- ---
54
+ ## Skill routing (quick reference)
348
55
 
349
- ## Key Principle
56
+ | User intent | Skill |
57
+ |---|---|
58
+ | New feature / unclear requirements | `trellis-brainstorm` |
59
+ | About to write code | `trellis-before-dev` |
60
+ | Done coding / quality check | `trellis-check` |
61
+ | Stuck / fixed same bug multiple times | `trellis-break-loop` |
62
+ | Learned something worth capturing | `trellis-update-spec` |
350
63
 
351
- > **Code-spec context is injected, not remembered.**
352
- >
353
- > The Task Workflow ensures agents receive relevant code-spec context automatically.
354
- > This is more reliable than hoping the AI "remembers" conventions.
64
+ Full rules + anti-rationalization table in `.trellis/workflow.md`.
@@ -18,6 +18,8 @@ Context loading determines when AI reads workflow, task, spec, research, workspa
18
18
  | --- | --- |
19
19
  | `.trellis/workflow.md` | Workflow and next-action hints. |
20
20
  | `.trellis/tasks/<task>/prd.md` | Current task requirements. |
21
+ | `.trellis/tasks/<task>/design.md` | Complex task technical design. |
22
+ | `.trellis/tasks/<task>/implement.md` | Complex task execution plan. |
21
23
  | `.trellis/tasks/<task>/implement.jsonl` | Spec/research to read before implementation. |
22
24
  | `.trellis/tasks/<task>/check.jsonl` | Spec/research to read during checking. |
23
25
  | `.trellis/spec/` | Project specs. |
@@ -64,10 +66,11 @@ First determine which mode the platform uses:
64
66
  In both modes, make sure the agent ultimately reads:
65
67
 
66
68
  1. active task
67
- 2. `prd.md`
68
- 3. `info.md` if present
69
- 4. the corresponding JSONL
70
- 5. spec/research referenced by the JSONL
69
+ 2. the corresponding JSONL
70
+ 3. spec/research referenced by the JSONL
71
+ 4. `prd.md`
72
+ 5. `design.md` if present
73
+ 6. `implement.md` if present
71
74
 
72
75
  ## Troubleshooting Order
73
76
 
@@ -6,7 +6,7 @@ When the user wants to change the engineering conventions AI follows, add new sp
6
6
 
7
7
  1. `.trellis/config.yaml`
8
8
  2. `.trellis/spec/`
9
- 3. `.trellis/workflow.md` Phase 1.3 and Phase 3.3
9
+ 3. `.trellis/workflow.md` planning artifact guidance and Phase 3.3
10
10
  4. Current task `implement.jsonl` / `check.jsonl`
11
11
 
12
12
  ## Common Needs
@@ -50,8 +50,9 @@ If the user wants only one platform to avoid sub-agents, first confirm whether t
50
50
  | `status` | Artifact state | Resume at |
51
51
  | --- | --- | --- |
52
52
  | `planning` | `prd.md` missing | Phase 1.1 (load `trellis-brainstorm`) |
53
- | `planning` | `prd.md` exists, `implement.jsonl` only has the seed `_example` row | Phase 1.3 (curate JSONL context) |
54
- | `planning` | `prd.md` exists, `implement.jsonl` curated | Phase 1.4 (run `task.py start`) |
53
+ | `planning` | lightweight task with `prd.md` complete | ask for start review, then run `task.py start` |
54
+ | `planning` | complex task missing `design.md` or `implement.md` | complete missing planning artifacts |
55
+ | `planning` | complex task has `prd.md`, `design.md`, and `implement.md` | ask for start review, then run `task.py start` |
55
56
  | `in_progress` | no implementation in conversation history | Phase 2.1 (`trellis-implement`) |
56
57
  | `in_progress` | implementation done, no `trellis-check` run | Phase 2.2 (`trellis-check`) |
57
58
  | `in_progress` | check passed | Phase 3.1 (verify quality + spec update) |
@@ -9,7 +9,7 @@ Trellis context injection aims to make AI read the right files at the right time
9
9
  | session context | `.trellis/scripts/get_context.py` | Current developer, git status, active task, active tasks, journal, packages. |
10
10
  | workflow context | `.trellis/workflow.md` | Current Trellis flow and next action. |
11
11
  | spec context | `.trellis/spec/` + task JSONL | Specs that must be followed during implementation/checking. |
12
- | task context | `.trellis/tasks/<task>/prd.md`, `info.md`, `research/` | Current task requirements, design, and research. |
12
+ | task context | `.trellis/tasks/<task>/prd.md`, `design.md`, `implement.md`, `research/` | Current task requirements, design, execution plan, and research. |
13
13
  | platform context | Platform hooks/settings/agents | Lets different AI tools read the files above through their own mechanisms. |
14
14
 
15
15
  ## session-start
@@ -34,10 +34,10 @@ If the user wants to change "what the AI should do next in a given state," edit
34
34
 
35
35
  Implement and check agents need task context. Trellis has two loading modes:
36
36
 
37
- 1. **hook push**: a platform hook injects `prd.md` and the files referenced by `implement.jsonl` / `check.jsonl` before the agent starts.
38
- 2. **agent pull**: the agent definition instructs the agent to read the active task, PRD, and JSONL context after startup.
37
+ 1. **hook push**: a platform hook injects jsonl-referenced files plus `prd.md`, `design.md` if present, and `implement.md` if present before the agent starts.
38
+ 2. **agent pull**: the agent definition instructs the agent to read the active task, jsonl context, and task artifacts after startup.
39
39
 
40
- In both modes, JSONL files in the task directory are the key interface.
40
+ In both modes, JSONL files in the task directory are the manifest for spec/research context. Task artifacts are read separately in this order: `prd.md` -> `design.md if present` -> `implement.md if present`.
41
41
 
42
42
  ## JSONL Reading Rules
43
43
 
@@ -65,4 +65,4 @@ If shell commands cannot see the same context key, `task.py current --source` ma
65
65
  | Change JSONL validation/display | `.trellis/scripts/common/task_context.py`. |
66
66
  | Change active task resolution | `.trellis/scripts/common/active_task.py`. |
67
67
 
68
- When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct PRD/spec/research.
68
+ When modifying context injection, verify two things: new sessions can see the correct task, and sub-agents can see the correct task artifacts/spec/research.
@@ -65,7 +65,7 @@ This command lists packages and spec layers for the current project. Use this ou
65
65
 
66
66
  ## How Specs Enter Tasks
67
67
 
68
- Before a task enters implementation, Phase 1.3 should write relevant specs into `implement.jsonl` / `check.jsonl`:
68
+ Before a task enters implementation, planning may write relevant specs into `implement.jsonl` / `check.jsonl` when the task needs spec or research context beyond the task artifacts:
69
69
 
70
70
  ```jsonl
71
71
  {"file": ".trellis/spec/cli/backend/index.md", "reason": "CLI backend conventions"}
@@ -9,7 +9,8 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
9
9
  ├── 04-28-example-task/
10
10
  │ ├── task.json
11
11
  │ ├── prd.md
12
- │ ├── info.md
12
+ │ ├── design.md
13
+ │ ├── implement.md
13
14
  │ ├── implement.jsonl
14
15
  │ ├── check.jsonl
15
16
  │ └── research/
@@ -20,8 +21,9 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
20
21
  | File | Purpose |
21
22
  | --- | --- |
22
23
  | `task.json` | Task metadata: status, assignee, priority, branch, parent/child tasks, and similar fields. |
23
- | `prd.md` | Requirements document; the most important business context during implementation. |
24
- | `info.md` | Optional technical design. |
24
+ | `prd.md` | Requirements, constraints, and acceptance criteria. Lightweight tasks may be PRD-only. |
25
+ | `design.md` | Technical design for complex tasks: boundaries, contracts, data flow, compatibility, tradeoffs. |
26
+ | `implement.md` | Execution plan for complex tasks: ordered checklist, validation commands, review gates, rollback points. |
25
27
  | `implement.jsonl` | List of spec/research files the implement agent must read first. |
26
28
  | `check.jsonl` | List of spec/research files the check agent must read first. |
27
29
  | `research/` | Research artifacts. Complex findings should not live only in chat. |
@@ -42,7 +44,34 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
42
44
  | `commit` / `pr_url` | Commit and PR information after completion. |
43
45
  | `meta` | Extension fields. |
44
46
 
45
- The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, `prd.md`, whether JSONL context is configured, and the phase descriptions in `workflow.md`.
47
+ ## Parent / Child Task Trees
48
+
49
+ Parent/child task relationships are for work structure. A parent task groups related deliverables under one source requirement set; it is not a dependency scheduler and does not replace the child task's own planning artifacts.
50
+
51
+ Use a parent task when a request has multiple independently verifiable deliverables. The parent owns:
52
+
53
+ - Source requirements and user-facing scope.
54
+ - The map of child tasks and their responsibility boundaries.
55
+ - Cross-child acceptance criteria and final integration review.
56
+
57
+ Use child tasks for deliverables that can move through planning, implementation, check, and archive independently. If one child depends on another, write that dependency in the child `prd.md` / `implement.md`; do not rely on tree position to imply ordering.
58
+
59
+ Create new children with:
60
+
61
+ ```bash
62
+ python3 ./.trellis/scripts/task.py create "<child title>" --slug <child-slug> --parent <parent-dir>
63
+ ```
64
+
65
+ Link or unlink existing tasks with:
66
+
67
+ ```bash
68
+ python3 ./.trellis/scripts/task.py add-subtask <parent-dir> <child-dir>
69
+ python3 ./.trellis/scripts/task.py remove-subtask <parent-dir> <child-dir>
70
+ ```
71
+
72
+ `children` on the parent is a historical list. When a child is archived, Trellis keeps that child name in the parent so progress like `[2/3 done]` remains meaningful after completed children move to `archive/`.
73
+
74
+ The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, artifact presence (`prd.md`, optional `design.md` / `implement.md`), whether JSONL context is configured for sub-agent mode, and the phase descriptions in `workflow.md`.
46
75
 
47
76
  ## Active Task
48
77
 
@@ -58,7 +87,7 @@ If the platform or shell environment has no stable session identity, `task.py st
58
87
 
59
88
  ## JSONL Context
60
89
 
61
- `implement.jsonl` and `check.jsonl` are context manifests for sub-agents to read first.
90
+ `implement.jsonl` and `check.jsonl` are context manifests for sub-agents to read first. They do not replace `implement.md`; `implement.md` is the human-readable execution plan.
62
91
 
63
92
  Format:
64
93
 
@@ -95,7 +124,7 @@ When modifying the task system, the AI should prefer script commands to maintain
95
124
  | Change the default task template | `.trellis/scripts/common/task_store.py` and task creation instructions. |
96
125
  | Change status semantics | `.trellis/workflow.md`, workflow-state hook logic, and task usage conventions. |
97
126
  | Add task lifecycle actions | `hooks.after_*` in `.trellis/config.yaml`. |
98
- | Change context rules | Phase 1.3 in `.trellis/workflow.md` and related platform agent/hook instructions. |
127
+ | Change context rules | Planning artifact guidance in `.trellis/workflow.md` and related platform agent/hook instructions. |
99
128
  | Change archive policy | `.trellis/scripts/common/task_store.py` / `task_utils.py`. |
100
129
 
101
130
  These are local files in the user project. Do not default to editing Trellis CLI source code unless the user wants to contribute upstream.
@@ -13,7 +13,7 @@ File locations and formats differ by platform, but responsibility boundaries sho
13
13
  | Agent | Responsibility |
14
14
  | --- | --- |
15
15
  | `trellis-research` | Investigate the question and write findings into the current task's `research/`. |
16
- | `trellis-implement` | Implement against `prd.md`, `info.md`, `implement.jsonl`, and related spec/research. |
16
+ | `trellis-implement` | Implement against `prd.md`, optional `design.md` / `implement.md`, `implement.jsonl`, and related spec/research. |
17
17
  | `trellis-check` | Review changes, fix discovered issues, and run necessary checks. |
18
18
 
19
19
  Agent files should not become generic chat prompts. They should define input sources, write boundaries, whether code may be changed, and how results are reported.
@@ -50,10 +50,11 @@ Common on platforms that support agent hooks.
50
50
  The agent file instructs the agent to read after startup:
51
51
 
52
52
  - `python3 ./.trellis/scripts/task.py current --source`
53
- - current task `prd.md`
54
- - `info.md`
55
53
  - `implement.jsonl` or `check.jsonl`
56
54
  - spec/research files referenced by JSONL
55
+ - current task `prd.md`
56
+ - `design.md` if present
57
+ - `implement.md` if present
57
58
 
58
59
  This mode fits platforms whose hooks cannot reliably rewrite sub-agent prompts.
59
60
 
@@ -70,7 +71,7 @@ This mode fits platforms whose hooks cannot reliably rewrite sub-agent prompts.
70
71
  ## Modification Principles
71
72
 
72
73
  1. **Keep responsibilities single-purpose**. Do not mix research, implement, and check responsibilities into one agent.
73
- 2. **Specify the read order**. Agents must know to start from the active task and then find the PRD and JSONL.
74
+ 2. **Specify the read order**. Agents must know to start from the active task, read jsonl/spec context, then read `prd.md`, `design.md` if present, and `implement.md` if present.
74
75
  3. **Specify write boundaries**. Research usually only writes `research/`; implement can write code; check can fix issues.
75
76
  4. **Keep semantics synchronized in multi-platform projects**. If the user configured Claude, Codex, and Cursor together, decide whether changes to one platform's agent also need to be applied to others.
76
77
 
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: trellis-spec-bootstarp
3
+ description: "Bootstrap project-specific Trellis coding specs with a platform-neutral single-agent workflow. Use when creating or refreshing .trellis/spec guidelines, analyzing a codebase with GitNexus, ABCoder, or source inspection, decomposing package/layer spec work, and writing real codebase-backed spec docs without placeholder text."
4
+ ---
5
+
6
+ # Trellis Spec Bootstarp
7
+
8
+ Use this skill to create or refresh `.trellis/spec/` guidelines from the real codebase. One capable agent owns the full loop: analyze the repository, choose the spec boundaries, write the docs, and verify the result. The workflow does not depend on a specific host, CLI, or agent brand.
9
+
10
+ ## Workflow
11
+
12
+ 1. Confirm Trellis is initialized and inspect the current `.trellis/spec/` tree.
13
+ 2. Analyze the repository architecture with the best available tools: GitNexus, ABCoder, language tooling, and direct source reads.
14
+ 3. Decompose the spec work by package and layer only when that reflects the actual codebase.
15
+ 4. Fill or reshape the spec files with concrete patterns, file paths, examples, and anti-patterns from the project.
16
+ 5. Verify that the final specs are internally consistent and contain no template placeholders.
17
+
18
+ ## Reference Routing
19
+
20
+ | Need | Read |
21
+ |------|------|
22
+ | Repository architecture analysis | [references/repository-analysis.md](references/repository-analysis.md) |
23
+ | Spec work decomposition and task planning | [references/spec-task-planning.md](references/spec-task-planning.md) |
24
+ | Writing high-signal Trellis spec files | [references/spec-writing.md](references/spec-writing.md) |
25
+ | GitNexus and ABCoder MCP setup | [references/mcp-setup.md](references/mcp-setup.md) |
26
+
27
+ ## Operating Rules
28
+
29
+ - Treat templates as starting points, not contracts. Delete, rename, split, or add spec files when the repository calls for it.
30
+ - Prefer source-backed rules over generic advice. Every important recommendation should point at a real file or repeated local pattern.
31
+ - Keep execution single-owner by default. Optional helper agents are an implementation detail, not a requirement or user-visible dependency.
32
+ - Do not write platform-specific instructions unless the target project already standardizes on that platform.
33
+ - Do not leave placeholder text, empty headings, or copied boilerplate in `.trellis/spec/`.
34
+
35
+ ## Done Criteria
36
+
37
+ - `.trellis/spec/` describes the project as it exists now.
38
+ - Each relevant package or layer has practical coding guidance with real examples.
39
+ - Non-applicable template sections are removed.
40
+ - `index.md` files match the final spec file set.
41
+ - Any required setup or analysis assumptions are documented in the relevant spec or task notes.