@pennixrv/trellis 0.7.1 → 0.7.2-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 (321) hide show
  1. package/README.md +10 -7
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +6 -4
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/ablate.d.ts.map +1 -1
  6. package/dist/commands/ablate.js +2 -0
  7. package/dist/commands/ablate.js.map +1 -1
  8. package/dist/commands/backup.d.ts +4 -0
  9. package/dist/commands/backup.d.ts.map +1 -0
  10. package/dist/commands/backup.js +75 -0
  11. package/dist/commands/backup.js.map +1 -0
  12. package/dist/commands/init.d.ts.map +1 -1
  13. package/dist/commands/init.js +705 -681
  14. package/dist/commands/init.js.map +1 -1
  15. package/dist/commands/mem.d.ts.map +1 -1
  16. package/dist/commands/mem.js +49 -7
  17. package/dist/commands/mem.js.map +1 -1
  18. package/dist/commands/task-progress.d.ts +1 -0
  19. package/dist/commands/task-progress.d.ts.map +1 -1
  20. package/dist/commands/task-progress.js +67 -25
  21. package/dist/commands/task-progress.js.map +1 -1
  22. package/dist/commands/teamwork/adapters/acp.d.ts +20 -0
  23. package/dist/commands/teamwork/adapters/acp.d.ts.map +1 -0
  24. package/dist/commands/teamwork/adapters/acp.js +268 -0
  25. package/dist/commands/teamwork/adapters/acp.js.map +1 -0
  26. package/dist/commands/teamwork/adapters/claude.d.ts +1 -0
  27. package/dist/commands/teamwork/adapters/claude.d.ts.map +1 -1
  28. package/dist/commands/teamwork/adapters/claude.js +5 -0
  29. package/dist/commands/teamwork/adapters/claude.js.map +1 -1
  30. package/dist/commands/teamwork/adapters/codex.d.ts +3 -2
  31. package/dist/commands/teamwork/adapters/codex.d.ts.map +1 -1
  32. package/dist/commands/teamwork/adapters/codex.js +14 -15
  33. package/dist/commands/teamwork/adapters/codex.js.map +1 -1
  34. package/dist/commands/teamwork/adapters/index.d.ts +23 -1
  35. package/dist/commands/teamwork/adapters/index.d.ts.map +1 -1
  36. package/dist/commands/teamwork/adapters/index.js +163 -24
  37. package/dist/commands/teamwork/adapters/index.js.map +1 -1
  38. package/dist/commands/teamwork/agent-loader.d.ts +2 -1
  39. package/dist/commands/teamwork/agent-loader.d.ts.map +1 -1
  40. package/dist/commands/teamwork/agent-loader.js +2 -1
  41. package/dist/commands/teamwork/agent-loader.js.map +1 -1
  42. package/dist/commands/teamwork/artifact.d.ts +42 -14
  43. package/dist/commands/teamwork/artifact.d.ts.map +1 -1
  44. package/dist/commands/teamwork/artifact.js +188 -85
  45. package/dist/commands/teamwork/artifact.js.map +1 -1
  46. package/dist/commands/teamwork/batch-reservation.d.ts +16 -0
  47. package/dist/commands/teamwork/batch-reservation.d.ts.map +1 -0
  48. package/dist/commands/teamwork/batch-reservation.js +43 -0
  49. package/dist/commands/teamwork/batch-reservation.js.map +1 -0
  50. package/dist/commands/teamwork/batch.d.ts +23 -0
  51. package/dist/commands/teamwork/batch.d.ts.map +1 -0
  52. package/dist/commands/teamwork/batch.js +415 -0
  53. package/dist/commands/teamwork/batch.js.map +1 -0
  54. package/dist/commands/teamwork/context-loader.d.ts +1 -1
  55. package/dist/commands/teamwork/context-loader.d.ts.map +1 -1
  56. package/dist/commands/teamwork/context-loader.js +19 -6
  57. package/dist/commands/teamwork/context-loader.js.map +1 -1
  58. package/dist/commands/teamwork/coordination.d.ts +88 -0
  59. package/dist/commands/teamwork/coordination.d.ts.map +1 -0
  60. package/dist/commands/teamwork/coordination.js +153 -0
  61. package/dist/commands/teamwork/coordination.js.map +1 -0
  62. package/dist/commands/teamwork/coordinator.d.ts +33 -6
  63. package/dist/commands/teamwork/coordinator.d.ts.map +1 -1
  64. package/dist/commands/teamwork/coordinator.js +948 -342
  65. package/dist/commands/teamwork/coordinator.js.map +1 -1
  66. package/dist/commands/teamwork/create.d.ts +1 -0
  67. package/dist/commands/teamwork/create.d.ts.map +1 -1
  68. package/dist/commands/teamwork/create.js +2 -1
  69. package/dist/commands/teamwork/create.js.map +1 -1
  70. package/dist/commands/teamwork/dev-parse-trace.d.ts +2 -1
  71. package/dist/commands/teamwork/dev-parse-trace.d.ts.map +1 -1
  72. package/dist/commands/teamwork/dev-parse-trace.js +2 -0
  73. package/dist/commands/teamwork/dev-parse-trace.js.map +1 -1
  74. package/dist/commands/teamwork/foreground-wait.d.ts +6 -0
  75. package/dist/commands/teamwork/foreground-wait.d.ts.map +1 -0
  76. package/dist/commands/teamwork/foreground-wait.js +65 -0
  77. package/dist/commands/teamwork/foreground-wait.js.map +1 -0
  78. package/dist/commands/teamwork/guard.d.ts +2 -2
  79. package/dist/commands/teamwork/guard.d.ts.map +1 -1
  80. package/dist/commands/teamwork/guard.js +25 -7
  81. package/dist/commands/teamwork/guard.js.map +1 -1
  82. package/dist/commands/teamwork/index.d.ts.map +1 -1
  83. package/dist/commands/teamwork/index.js +163 -10
  84. package/dist/commands/teamwork/index.js.map +1 -1
  85. package/dist/commands/teamwork/kill.d.ts +2 -0
  86. package/dist/commands/teamwork/kill.d.ts.map +1 -1
  87. package/dist/commands/teamwork/kill.js +79 -38
  88. package/dist/commands/teamwork/kill.js.map +1 -1
  89. package/dist/commands/teamwork/messages.d.ts.map +1 -1
  90. package/dist/commands/teamwork/messages.js +3 -0
  91. package/dist/commands/teamwork/messages.js.map +1 -1
  92. package/dist/commands/teamwork/plan.d.ts +22 -0
  93. package/dist/commands/teamwork/plan.d.ts.map +1 -0
  94. package/dist/commands/teamwork/plan.js +288 -0
  95. package/dist/commands/teamwork/plan.js.map +1 -0
  96. package/dist/commands/teamwork/process-identity.d.ts +3 -0
  97. package/dist/commands/teamwork/process-identity.d.ts.map +1 -0
  98. package/dist/commands/teamwork/process-identity.js +24 -0
  99. package/dist/commands/teamwork/process-identity.js.map +1 -0
  100. package/dist/commands/teamwork/profiles.d.ts +43 -6
  101. package/dist/commands/teamwork/profiles.d.ts.map +1 -1
  102. package/dist/commands/teamwork/profiles.js +138 -110
  103. package/dist/commands/teamwork/profiles.js.map +1 -1
  104. package/dist/commands/teamwork/prompt.d.ts +4 -0
  105. package/dist/commands/teamwork/prompt.d.ts.map +1 -0
  106. package/dist/commands/teamwork/prompt.js +33 -0
  107. package/dist/commands/teamwork/prompt.js.map +1 -0
  108. package/dist/commands/teamwork/result.d.ts +55 -0
  109. package/dist/commands/teamwork/result.d.ts.map +1 -0
  110. package/dist/commands/teamwork/result.js +94 -0
  111. package/dist/commands/teamwork/result.js.map +1 -0
  112. package/dist/commands/teamwork/rm.d.ts.map +1 -1
  113. package/dist/commands/teamwork/rm.js +64 -64
  114. package/dist/commands/teamwork/rm.js.map +1 -1
  115. package/dist/commands/teamwork/run.d.ts +5 -0
  116. package/dist/commands/teamwork/run.d.ts.map +1 -1
  117. package/dist/commands/teamwork/run.js +120 -24
  118. package/dist/commands/teamwork/run.js.map +1 -1
  119. package/dist/commands/teamwork/runtime.d.ts +9 -0
  120. package/dist/commands/teamwork/runtime.d.ts.map +1 -0
  121. package/dist/commands/teamwork/runtime.js +401 -0
  122. package/dist/commands/teamwork/runtime.js.map +1 -0
  123. package/dist/commands/teamwork/send.d.ts +1 -0
  124. package/dist/commands/teamwork/send.d.ts.map +1 -1
  125. package/dist/commands/teamwork/send.js +2 -1
  126. package/dist/commands/teamwork/send.js.map +1 -1
  127. package/dist/commands/teamwork/spawn.d.ts +10 -3
  128. package/dist/commands/teamwork/spawn.d.ts.map +1 -1
  129. package/dist/commands/teamwork/spawn.js +42 -27
  130. package/dist/commands/teamwork/spawn.js.map +1 -1
  131. package/dist/commands/teamwork/store/lock.js +28 -4
  132. package/dist/commands/teamwork/store/lock.js.map +1 -1
  133. package/dist/commands/teamwork/supervisor/inbox.d.ts +1 -0
  134. package/dist/commands/teamwork/supervisor/inbox.d.ts.map +1 -1
  135. package/dist/commands/teamwork/supervisor/inbox.js +28 -9
  136. package/dist/commands/teamwork/supervisor/inbox.js.map +1 -1
  137. package/dist/commands/teamwork/supervisor/stdout.d.ts.map +1 -1
  138. package/dist/commands/teamwork/supervisor/stdout.js +2 -3
  139. package/dist/commands/teamwork/supervisor/stdout.js.map +1 -1
  140. package/dist/commands/teamwork/supervisor/warning.d.ts.map +1 -1
  141. package/dist/commands/teamwork/supervisor/warning.js +2 -3
  142. package/dist/commands/teamwork/supervisor/warning.js.map +1 -1
  143. package/dist/commands/teamwork/supervisor.d.ts +5 -0
  144. package/dist/commands/teamwork/supervisor.d.ts.map +1 -1
  145. package/dist/commands/teamwork/supervisor.js +21 -12
  146. package/dist/commands/teamwork/supervisor.js.map +1 -1
  147. package/dist/commands/teamwork/teammate-adapters.d.ts +0 -5
  148. package/dist/commands/teamwork/teammate-adapters.d.ts.map +1 -1
  149. package/dist/commands/teamwork/teammate-adapters.js +9 -56
  150. package/dist/commands/teamwork/teammate-adapters.js.map +1 -1
  151. package/dist/commands/teamwork/teammate-config.d.ts +5 -1
  152. package/dist/commands/teamwork/teammate-config.d.ts.map +1 -1
  153. package/dist/commands/teamwork/teammate-config.js +62 -19
  154. package/dist/commands/teamwork/teammate-config.js.map +1 -1
  155. package/dist/commands/teamwork/teammate-launch.d.ts +15 -6
  156. package/dist/commands/teamwork/teammate-launch.d.ts.map +1 -1
  157. package/dist/commands/teamwork/teammate-launch.js +129 -22
  158. package/dist/commands/teamwork/teammate-launch.js.map +1 -1
  159. package/dist/commands/teamwork/wait.d.ts +2 -0
  160. package/dist/commands/teamwork/wait.d.ts.map +1 -1
  161. package/dist/commands/teamwork/wait.js +44 -3
  162. package/dist/commands/teamwork/wait.js.map +1 -1
  163. package/dist/commands/uninstall.d.ts.map +1 -1
  164. package/dist/commands/uninstall.js +92 -84
  165. package/dist/commands/uninstall.js.map +1 -1
  166. package/dist/commands/update.d.ts.map +1 -1
  167. package/dist/commands/update.js +635 -592
  168. package/dist/commands/update.js.map +1 -1
  169. package/dist/commands/workflow.d.ts.map +1 -1
  170. package/dist/commands/workflow.js +94 -89
  171. package/dist/commands/workflow.js.map +1 -1
  172. package/dist/configurators/shared.js +2 -2
  173. package/dist/configurators/shared.js.map +1 -1
  174. package/dist/configurators/workflow.d.ts.map +1 -1
  175. package/dist/configurators/workflow.js +14 -32
  176. package/dist/configurators/workflow.js.map +1 -1
  177. package/dist/constants/paths.d.ts +3 -10
  178. package/dist/constants/paths.d.ts.map +1 -1
  179. package/dist/constants/paths.js +4 -13
  180. package/dist/constants/paths.js.map +1 -1
  181. package/dist/migrations/manifests/0.7.1-beta.0.json +9 -0
  182. package/dist/migrations/manifests/0.7.1-beta.1.json +186 -0
  183. package/dist/migrations/manifests/0.7.1-beta.10.json +9 -0
  184. package/dist/migrations/manifests/0.7.1-beta.11.json +9 -0
  185. package/dist/migrations/manifests/0.7.1-beta.12.json +9 -0
  186. package/dist/migrations/manifests/0.7.1-beta.13.json +9 -0
  187. package/dist/migrations/manifests/0.7.1-beta.14.json +11 -0
  188. package/dist/migrations/manifests/0.7.1-beta.15.json +9 -0
  189. package/dist/migrations/manifests/0.7.1-beta.16.json +9 -0
  190. package/dist/migrations/manifests/0.7.1-beta.17.json +9 -0
  191. package/dist/migrations/manifests/0.7.1-beta.18.json +9 -0
  192. package/dist/migrations/manifests/0.7.1-beta.19.json +9 -0
  193. package/dist/migrations/manifests/0.7.1-beta.2.json +522 -0
  194. package/dist/migrations/manifests/0.7.1-beta.3.json +9 -0
  195. package/dist/migrations/manifests/0.7.1-beta.4.json +9 -0
  196. package/dist/migrations/manifests/0.7.1-beta.5.json +9 -0
  197. package/dist/migrations/manifests/0.7.1-beta.6.json +10 -0
  198. package/dist/migrations/manifests/0.7.1-beta.7.json +8 -0
  199. package/dist/migrations/manifests/0.7.1-beta.8.json +481 -0
  200. package/dist/migrations/manifests/0.7.1-beta.9.json +191 -0
  201. package/dist/migrations/manifests/0.7.2-beta.0.json +11 -0
  202. package/dist/migrations/manifests/0.7.2-beta.1.json +11 -0
  203. package/dist/migrations/manifests/0.7.2-beta.2.json +11 -0
  204. package/dist/templates/claude/hooks/statusline.py +9 -4
  205. package/dist/templates/codex/hooks/session-start.py +14 -11
  206. package/dist/templates/codex/hooks.json +10 -0
  207. package/dist/templates/common/bundled-skills/trellis-decision-space-construction-and-merging/workflow.md +2 -0
  208. package/dist/templates/common/bundled-skills/trellis-goal-exploration-and-requirements/workflow.md +2 -0
  209. package/dist/templates/common/bundled-skills/trellis-meta/SKILL.md +1 -1
  210. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/add-project-local-conventions.md +1 -1
  211. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +5 -5
  212. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +3 -2
  213. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/overview.md +1 -1
  214. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +1 -1
  215. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/multi-agent-teamwork.md +14 -2
  216. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +8 -2
  217. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +2 -1
  218. package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +2 -2
  219. package/dist/templates/common/bundled-skills/trellis-solution-design-and-convergence/workflow.md +8 -0
  220. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +4 -2
  221. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +2 -2
  222. package/dist/templates/common/bundled-skills/trellis-task-implementation/workflow.md +6 -0
  223. package/dist/templates/common/bundled-skills/trellis-teamwork/SKILL.md +18 -3
  224. package/dist/templates/common/bundled-skills/trellis-teamwork/references/coordination-modes.md +34 -3
  225. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-configuration-matrix.md +37 -26
  226. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teammate-processes.md +128 -14
  227. package/dist/templates/common/bundled-skills/trellis-teamwork/references/teamwork-plan-construction.md +152 -20
  228. package/dist/templates/common/commands/start.md +2 -2
  229. package/dist/templates/common/skills/before-dev.md +1 -4
  230. package/dist/templates/common/skills/break-loop.md +7 -18
  231. package/dist/templates/common/skills/check.md +7 -11
  232. package/dist/templates/common/skills/{brainstorm.md → request-intake.md} +5 -3
  233. package/dist/templates/common/skills/update-spec.md +5 -7
  234. package/dist/templates/copilot/hooks/session-start.py +14 -11
  235. package/dist/templates/copilot/index.d.ts +1 -6
  236. package/dist/templates/copilot/index.d.ts.map +1 -1
  237. package/dist/templates/copilot/index.js +1 -14
  238. package/dist/templates/copilot/index.js.map +1 -1
  239. package/dist/templates/extract.js +4 -0
  240. package/dist/templates/extract.js.map +1 -1
  241. package/dist/templates/markdown/spec/backend/index.md.txt +4 -35
  242. package/dist/templates/markdown/spec/frontend/index.md.txt +4 -36
  243. package/dist/templates/omp/extensions/trellis/index.ts.txt +2 -2
  244. package/dist/templates/opencode/lib/session-utils.js +301 -209
  245. package/dist/templates/pi/extensions/trellis/index.ts.txt +17 -1
  246. package/dist/templates/shared-hooks/guard-teamwork-wait.py +58 -0
  247. package/dist/templates/shared-hooks/index.d.ts +1 -1
  248. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  249. package/dist/templates/shared-hooks/index.js +1 -0
  250. package/dist/templates/shared-hooks/index.js.map +1 -1
  251. package/dist/templates/shared-hooks/inject-workflow-state.py +8 -3
  252. package/dist/templates/shared-hooks/session-start.py +16 -12
  253. package/dist/templates/snow/SNOW.md +1 -1
  254. package/dist/templates/trellis/agents/delegated-worktree-primary-agent.md +9 -0
  255. package/dist/templates/trellis/agents/profiles/architecture.md +9 -0
  256. package/dist/templates/trellis/agents/profiles/diagnosis.md +9 -0
  257. package/dist/templates/trellis/agents/profiles/exploration.md +9 -0
  258. package/dist/templates/trellis/agents/profiles/research.md +9 -0
  259. package/dist/templates/trellis/agents/profiles/review.md +9 -0
  260. package/dist/templates/trellis/agents/profiles/verification.md +9 -0
  261. package/dist/templates/trellis/agents/teammate-profiles.json +56 -4
  262. package/dist/templates/trellis/agents/teammate.md +4 -52
  263. package/dist/templates/trellis/config.yaml +2 -5
  264. package/dist/templates/trellis/index.d.ts +4 -0
  265. package/dist/templates/trellis/index.d.ts.map +1 -1
  266. package/dist/templates/trellis/index.js +22 -4
  267. package/dist/templates/trellis/index.js.map +1 -1
  268. package/dist/templates/trellis/scripts/add_session.py +1 -1
  269. package/dist/templates/trellis/scripts/common/active_task.py +3 -47
  270. package/dist/templates/trellis/scripts/common/config.py +5 -0
  271. package/dist/templates/trellis/scripts/common/paths.py +9 -25
  272. package/dist/templates/trellis/scripts/common/safe_commit.py +8 -8
  273. package/dist/templates/trellis/scripts/common/task_context.py +11 -51
  274. package/dist/templates/trellis/scripts/common/task_continuity.py +191 -60
  275. package/dist/templates/trellis/scripts/common/task_layout.py +80 -0
  276. package/dist/templates/trellis/scripts/common/task_move.py +345 -0
  277. package/dist/templates/trellis/scripts/common/task_store.py +51 -57
  278. package/dist/templates/trellis/scripts/common/task_utils.py +23 -19
  279. package/dist/templates/trellis/scripts/common/task_workflow.py +395 -49
  280. package/dist/templates/trellis/scripts/common/tasks.py +6 -5
  281. package/dist/templates/trellis/scripts/hooks/linear_sync.py +13 -3
  282. package/dist/templates/trellis/scripts/task.py +76 -24
  283. package/dist/templates/trellis/teamwork.json +10 -0
  284. package/dist/templates/trellis/workflow.md +11 -2
  285. package/dist/utils/ablation-store.d.ts +1 -1
  286. package/dist/utils/ablation-store.d.ts.map +1 -1
  287. package/dist/utils/ablation-store.js +58 -24
  288. package/dist/utils/ablation-store.js.map +1 -1
  289. package/dist/utils/asset-backup.d.ts +138 -0
  290. package/dist/utils/asset-backup.d.ts.map +1 -0
  291. package/dist/utils/asset-backup.js +525 -0
  292. package/dist/utils/asset-backup.js.map +1 -0
  293. package/dist/utils/atomic-write.d.ts +1 -1
  294. package/dist/utils/atomic-write.d.ts.map +1 -1
  295. package/dist/utils/atomic-write.js +6 -3
  296. package/dist/utils/atomic-write.js.map +1 -1
  297. package/dist/utils/manifest-prune.d.ts +4 -1
  298. package/dist/utils/manifest-prune.d.ts.map +1 -1
  299. package/dist/utils/manifest-prune.js +17 -6
  300. package/dist/utils/manifest-prune.js.map +1 -1
  301. package/dist/utils/template-fetcher.d.ts +4 -19
  302. package/dist/utils/template-fetcher.d.ts.map +1 -1
  303. package/dist/utils/template-fetcher.js +9 -45
  304. package/dist/utils/template-fetcher.js.map +1 -1
  305. package/dist/utils/template-hash.d.ts +5 -4
  306. package/dist/utils/template-hash.d.ts.map +1 -1
  307. package/dist/utils/template-hash.js +24 -17
  308. package/dist/utils/template-hash.js.map +1 -1
  309. package/package.json +3 -2
  310. package/dist/templates/copilot/prompts/before-dev.prompt.md +0 -39
  311. package/dist/templates/copilot/prompts/brainstorm.prompt.md +0 -13
  312. package/dist/templates/copilot/prompts/break-loop.prompt.md +0 -129
  313. package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +0 -170
  314. package/dist/templates/copilot/prompts/check.prompt.md +0 -110
  315. package/dist/templates/copilot/prompts/create-command.prompt.md +0 -116
  316. package/dist/templates/copilot/prompts/finish-work.prompt.md +0 -22
  317. package/dist/templates/copilot/prompts/integrate-skill.prompt.md +0 -223
  318. package/dist/templates/copilot/prompts/onboard.prompt.md +0 -362
  319. package/dist/templates/copilot/prompts/record-session.prompt.md +0 -58
  320. package/dist/templates/copilot/prompts/start.prompt.md +0 -65
  321. package/dist/templates/copilot/prompts/update-spec.prompt.md +0 -358
@@ -1,65 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: Start Session"
3
- ---
4
-
5
- # Start Session
6
-
7
- Use this prompt to inspect or refresh Trellis context. Copilot also supplies SessionStart context and a per-turn workflow-state breadcrumb through its hooks.
8
-
9
- ---
10
-
11
- ## Step 1: Current state
12
- Identity, git status, current task, active tasks, journal location.
13
-
14
- ```bash
15
- {{PYTHON_CMD}} ./.trellis/scripts/get_context.py
16
- ```
17
-
18
- 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.
19
-
20
- ## Step 2: Workflow overview
21
- Phase Index + skill routing table + DO-NOT-skip rules.
22
-
23
- ```bash
24
- {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode phase
25
- ```
26
-
27
- Full guide in `.trellis/workflow.md` (read on demand).
28
-
29
- ## Step 3: Guideline indexes
30
- Discover packages + spec layers, then read each relevant index file.
31
-
32
- ```bash
33
- {{PYTHON_CMD}} ./.trellis/scripts/get_context.py --mode packages
34
- cat .trellis/spec/guides/index.md
35
- cat .trellis/spec/<package>/<layer>/index.md # for each relevant layer
36
- ```
37
-
38
- Index files list the specific guideline docs to read when you actually start coding.
39
-
40
- ## Step 4: Decide next action
41
- Use the current `<workflow-state>` breadcrumb to identify the business phase; task lifecycle status (`planning` or `in_progress`) and artifact presence do not identify that phase. If the breadcrumb is missing or stale, inspect the task with `task.py phase show <task>` and follow the matching phase Skill in `.trellis/workflow.md`.
42
-
43
- - **An active phase is recorded** → continue that phase and load its matching Skill.
44
- - **The task has no initialized phase route** → load `trellis-goal-exploration-and-requirements`, align and obtain the user's confirmation of the current requirements baseline, then initialize the applicable ordered route with `task.py phase init`.
45
- - **No active task** → classify first. Handle a clear, low-risk, reversible, authorized, immediately verifiable request directly; otherwise ask for task-creation consent and begin with `trellis-goal-exploration-and-requirements`.
46
-
47
- `task.py start` enters implementation only after an accepted implementation contract from Solution Design and Convergence Phase and separate implementation authorization.
48
-
49
- ---
50
-
51
- ## Skill routing (quick reference)
52
-
53
- | User intent | Skill |
54
- |---|---|
55
- | Goal and requirements | `trellis-goal-exploration-and-requirements` |
56
- | Decision alternatives | `trellis-decision-space-construction-and-merging` |
57
- | Solution design | `trellis-solution-design-and-convergence` |
58
- | Implementation | `trellis-task-implementation` |
59
- | Delivery review | `trellis-delivery-review-and-closeout` |
60
- | About to write code | `trellis-before-dev` |
61
- | Done coding / quality check | `trellis-check` |
62
- | Stuck / fixed same bug multiple times | `trellis-break-loop` |
63
- | Learned something worth capturing | `trellis-update-spec` |
64
-
65
- Full rules + anti-rationalization table in `.trellis/workflow.md`.
@@ -1,358 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: Update Code-Spec - Capture Executable Contracts"
3
- ---
4
-
5
- # Update Code-Spec - Capture Executable Contracts
6
-
7
- When you learn something valuable (from debugging, implementing, or discussion), use this command to update the relevant code-spec documents.
8
-
9
- **Timing**: After completing a task, fixing a bug, or discovering a new pattern
10
-
11
- ---
12
-
13
- ## Code-Spec First Rule (CRITICAL)
14
-
15
- In this project, "spec" for implementation work means **code-spec**:
16
- - Executable contracts (not principle-only text)
17
- - Concrete signatures, payload fields, env keys, and boundary behavior
18
- - Testable validation/error behavior
19
-
20
- If the change touches infra or cross-layer contracts, code-spec depth is mandatory.
21
-
22
- ### Mandatory Triggers
23
-
24
- Apply code-spec depth when the change includes any of:
25
- - New/changed command or API signature
26
- - Cross-layer request/response contract change
27
- - Database schema/migration change
28
- - Infra integration (storage, queue, cache, secrets, env wiring)
29
-
30
- ### Mandatory Output (7 Sections)
31
-
32
- For triggered tasks, include all sections below:
33
- 1. Scope / Trigger
34
- 2. Signatures (command/API/DB)
35
- 3. Contracts (request/response/env)
36
- 4. Validation & Error Matrix
37
- 5. Good/Base/Bad Cases
38
- 6. Tests Required (with assertion points)
39
- 7. Wrong vs Correct (at least one pair)
40
-
41
- ---
42
-
43
- ## When to Update Code-Specs
44
-
45
- | Trigger | Example | Target Spec |
46
- |---------|---------|-------------|
47
- | **Implemented a feature** | Added template download with giget | Relevant `backend/` or `frontend/` file |
48
- | **Made a design decision** | Used type field + mapping table for extensibility | Relevant code-spec + "Design Decisions" section |
49
- | **Fixed a bug** | Found a subtle issue with error handling | `backend/error-handling.md` |
50
- | **Discovered a pattern** | Found a better way to structure code | Relevant `backend/` or `frontend/` file |
51
- | **Hit a gotcha** | Learned that X must be done before Y | Relevant code-spec + "Common Mistakes" section |
52
- | **Established a convention** | Team agreed on naming pattern | `quality-guidelines.md` |
53
- | **New thinking trigger** | "Don't forget to check X before doing Y" | `guides/*.md` (as a checklist item, not detailed rules) |
54
-
55
- **Key Insight**: Code-spec updates are NOT just for problems. Every feature implementation contains design decisions and contracts that future AI/developers need to execute safely.
56
-
57
- ---
58
-
59
- ## Spec Structure Overview
60
-
61
- ```
62
- .trellis/spec/
63
- ├── backend/ # Backend coding standards
64
- �? ├── index.md # Overview and links
65
- �? └── *.md # Topic-specific guidelines
66
- ├── frontend/ # Frontend coding standards
67
- �? ├── index.md # Overview and links
68
- �? └── *.md # Topic-specific guidelines
69
- └── guides/ # Thinking checklists (NOT coding specs!)
70
- ├── index.md # Guide index
71
- └── *.md # Topic-specific guides
72
- ```
73
-
74
- ### CRITICAL: Code-Spec vs Guide - Know the Difference
75
-
76
- | Type | Location | Purpose | Content Style |
77
- |------|----------|---------|---------------|
78
- | **Code-Spec** | `backend/*.md`, `frontend/*.md` | Tell AI "how to implement safely" | Signatures, contracts, matrices, cases, test points |
79
- | **Guide** | `guides/*.md` | Help AI "what to think about" | Checklists, questions, pointers to specs |
80
-
81
- **Decision Rule**: Ask yourself:
82
-
83
- - "This is **how to write** the code" �?Put in `backend/` or `frontend/`
84
- - "This is **what to consider** before writing" �?Put in `guides/`
85
-
86
- **Example**:
87
-
88
- | Learning | Wrong Location | Correct Location |
89
- |----------|----------------|------------------|
90
- | "Use `reconfigure()` not `TextIOWrapper` for Windows stdout" | �?`guides/cross-platform-thinking-guide.md` | �?`backend/script-conventions.md` |
91
- | "Remember to check encoding when writing cross-platform code" | �?`backend/script-conventions.md` | �?`guides/cross-platform-thinking-guide.md` |
92
-
93
- **Guides should be short checklists that point to specs**, not duplicate the detailed rules.
94
-
95
- ---
96
-
97
- ## Update Process
98
-
99
- ### Step 1: Identify What You Learned
100
-
101
- Answer these questions:
102
-
103
- 1. **What did you learn?** (Be specific)
104
- 2. **Why is it important?** (What problem does it prevent?)
105
- 3. **Where does it belong?** (Which spec file?)
106
-
107
- ### Step 2: Classify the Update Type
108
-
109
- | Type | Description | Action |
110
- |------|-------------|--------|
111
- | **Design Decision** | Why we chose approach X over Y | Add to "Design Decisions" section |
112
- | **Project Convention** | How we do X in this project | Add to relevant section with examples |
113
- | **New Pattern** | A reusable approach discovered | Add to "Patterns" section |
114
- | **Forbidden Pattern** | Something that causes problems | Add to "Anti-patterns" or "Don't" section |
115
- | **Common Mistake** | Easy-to-make error | Add to "Common Mistakes" section |
116
- | **Convention** | Agreed-upon standard | Add to relevant section |
117
- | **Gotcha** | Non-obvious behavior | Add warning callout |
118
-
119
- ### Step 3: Read the Target Code-Spec
120
-
121
- Before editing, read the current code-spec to:
122
- - Understand existing structure
123
- - Avoid duplicating content
124
- - Find the right section for your update
125
-
126
- ```bash
127
- cat .trellis/spec/<category>/<file>.md
128
- ```
129
-
130
- ### Step 4: Make the Update
131
-
132
- Follow these principles:
133
-
134
- 1. **Be Specific**: Include concrete examples, not just abstract rules
135
- 2. **Explain Why**: State the problem this prevents
136
- 3. **Show Contracts**: Add signatures, payload fields, and error behavior
137
- 4. **Show Code**: Add code snippets for key patterns
138
- 5. **Keep it Short**: One concept per section
139
-
140
- ### Step 5: Update the Index (if needed)
141
-
142
- If you added a new section or the code-spec status changed, update the category's `index.md`.
143
-
144
- ---
145
-
146
- ## Update Templates
147
-
148
- ### Mandatory Template for Infra/Cross-Layer Work
149
-
150
- ```markdown
151
- ## Scenario: <name>
152
-
153
- ### 1. Scope / Trigger
154
- - Trigger: <why this requires code-spec depth>
155
-
156
- ### 2. Signatures
157
- - Backend command/API/DB signature(s)
158
-
159
- ### 3. Contracts
160
- - Request fields (name, type, constraints)
161
- - Response fields (name, type, constraints)
162
- - Environment keys (required/optional)
163
-
164
- ### 4. Validation & Error Matrix
165
- - <condition> -> <error>
166
-
167
- ### 5. Good/Base/Bad Cases
168
- - Good: ...
169
- - Base: ...
170
- - Bad: ...
171
-
172
- ### 6. Tests Required
173
- - Unit/Integration/E2E with assertion points
174
-
175
- ### 7. Wrong vs Correct
176
- #### Wrong
177
- ...
178
- #### Correct
179
- ...
180
- ```
181
-
182
- ### Adding a Design Decision
183
-
184
- ```markdown
185
- ### Design Decision: [Decision Name]
186
-
187
- **Context**: What problem were we solving?
188
-
189
- **Options Considered**:
190
- 1. Option A - brief description
191
- 2. Option B - brief description
192
-
193
- **Decision**: We chose Option X because...
194
-
195
- **Example**:
196
- \`\`\`typescript
197
- // How it's implemented
198
- code example
199
- \`\`\`
200
-
201
- **Extensibility**: How to extend this in the future...
202
- ```
203
-
204
- ### Adding a Project Convention
205
-
206
- ```markdown
207
- ### Convention: [Convention Name]
208
-
209
- **What**: Brief description of the convention.
210
-
211
- **Why**: Why we do it this way in this project.
212
-
213
- **Example**:
214
- \`\`\`typescript
215
- // How to follow this convention
216
- code example
217
- \`\`\`
218
-
219
- **Related**: Links to related conventions or specs.
220
- ```
221
-
222
- ### Adding a New Pattern
223
-
224
- ```markdown
225
- ### Pattern Name
226
-
227
- **Problem**: What problem does this solve?
228
-
229
- **Solution**: Brief description of the approach.
230
-
231
- **Example**:
232
- \`\`\`
233
- // Good
234
- code example
235
-
236
- // Bad
237
- code example
238
- \`\`\`
239
-
240
- **Why**: Explanation of why this works better.
241
- ```
242
-
243
- ### Adding a Forbidden Pattern
244
-
245
- ```markdown
246
- ### Don't: Pattern Name
247
-
248
- **Problem**:
249
- \`\`\`
250
- // Don't do this
251
- bad code example
252
- \`\`\`
253
-
254
- **Why it's bad**: Explanation of the issue.
255
-
256
- **Instead**:
257
- \`\`\`
258
- // Do this instead
259
- good code example
260
- \`\`\`
261
- ```
262
-
263
- ### Adding a Common Mistake
264
-
265
- ```markdown
266
- ### Common Mistake: Description
267
-
268
- **Symptom**: What goes wrong
269
-
270
- **Cause**: Why this happens
271
-
272
- **Fix**: How to correct it
273
-
274
- **Prevention**: How to avoid it in the future
275
- ```
276
-
277
- ### Adding a Gotcha
278
-
279
- ```markdown
280
- > **Warning**: Brief description of the non-obvious behavior.
281
- >
282
- > Details about when this happens and how to handle it.
283
- ```
284
-
285
- ---
286
-
287
- ## Interactive Mode
288
-
289
- If you're unsure what to update, answer these prompts:
290
-
291
- 1. **What did you just finish?**
292
- - [ ] Fixed a bug
293
- - [ ] Implemented a feature
294
- - [ ] Refactored code
295
- - [ ] Had a discussion about approach
296
-
297
- 2. **What did you learn or decide?**
298
- - Design decision (why X over Y)
299
- - Project convention (how we do X)
300
- - Non-obvious behavior (gotcha)
301
- - Better approach (pattern)
302
-
303
- 3. **Would future AI/developers need to know this?**
304
- - To understand how the code works �?Yes, update spec
305
- - To maintain or extend the feature �?Yes, update spec
306
- - To avoid repeating mistakes �?Yes, update spec
307
- - Purely one-off implementation detail �?Maybe skip
308
-
309
- 4. **Which area does it relate to?**
310
- - [ ] Backend code
311
- - [ ] Frontend code
312
- - [ ] Cross-layer data flow
313
- - [ ] Code organization/reuse
314
- - [ ] Quality/testing
315
-
316
- ---
317
-
318
- ## Quality Checklist
319
-
320
- Before finishing your code-spec update:
321
-
322
- - [ ] Is the content specific and actionable?
323
- - [ ] Did you include a code example?
324
- - [ ] Did you explain WHY, not just WHAT?
325
- - [ ] Did you include executable signatures/contracts?
326
- - [ ] Did you include validation and error matrix?
327
- - [ ] Did you include Good/Base/Bad cases?
328
- - [ ] Did you include required tests with assertion points?
329
- - [ ] Is it in the right code-spec file?
330
- - [ ] Does it duplicate existing content?
331
- - [ ] Would a new team member understand it?
332
-
333
- ---
334
-
335
- ## Relationship to Other Commands
336
-
337
- ```
338
- Development Flow:
339
- Learn something �?/ �?Knowledge captured
340
- �? �?
341
- / ←──────────────────── Future sessions benefit
342
- (deep bug analysis)
343
- ```
344
-
345
- - `/` - Analyzes bugs deeply, often reveals spec updates needed
346
- - `/` - Actually makes the updates (this command)
347
- - `/` - Reminds you to check if specs need updates
348
-
349
- ---
350
-
351
- ## Core Philosophy
352
-
353
- > **Code-specs are living documents. Every debugging session, every "aha moment" is an opportunity to make the implementation contract clearer.**
354
-
355
- The goal is **institutional memory**:
356
- - What one person learns, everyone benefits from
357
- - What AI learns in one session, persists to future sessions
358
- - Mistakes become documented guardrails