@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,129 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: Break the Loop - Deep Bug Analysis"
3
- ---
4
-
5
- # Break the Loop - Deep Bug Analysis
6
-
7
- When debug is complete, use this command for deep analysis to break the "fix bug -> forget -> repeat" cycle.
8
-
9
- ---
10
-
11
- ## Analysis Framework
12
-
13
- Analyze the bug you just fixed from these 5 dimensions:
14
-
15
- ### 1. Root Cause Category
16
-
17
- Which category does this bug belong to?
18
-
19
- | Category | Characteristics | Example |
20
- |----------|-----------------|---------|
21
- | **A. Missing Spec** | No documentation on how to do it | New feature without checklist |
22
- | **B. Cross-Layer Contract** | Interface between layers unclear | API returns different format than expected |
23
- | **C. Change Propagation Failure** | Changed one place, missed others | Changed function signature, missed call sites |
24
- | **D. Test Coverage Gap** | Unit test passes, integration fails | Works alone, breaks when combined |
25
- | **E. Implicit Assumption** | Code relies on undocumented assumption | Timestamp seconds vs milliseconds |
26
-
27
- ### 2. Why Fixes Failed (if applicable)
28
-
29
- If you tried multiple fixes before succeeding, analyze each failure:
30
-
31
- - **Surface Fix**: Fixed symptom, not root cause
32
- - **Incomplete Scope**: Found root cause, didn't cover all cases
33
- - **Tool Limitation**: grep missed it, type check wasn't strict
34
- - **Mental Model**: Kept looking in same layer, didn't think cross-layer
35
-
36
- ### 3. Prevention Mechanisms
37
-
38
- What mechanisms would prevent this from happening again?
39
-
40
- | Type | Description | Example |
41
- |------|-------------|---------|
42
- | **Documentation** | Write it down so people know | Update thinking guide |
43
- | **Architecture** | Make the error impossible structurally | Type-safe wrappers |
44
- | **Compile-time** | TypeScript strict, no any | Signature change causes compile error |
45
- | **Runtime** | Monitoring, alerts, scans | Detect orphan entities |
46
- | **Test Coverage** | E2E tests, integration tests | Verify full flow |
47
- | **Code Review** | Checklist, PR template | "Did you check X?" |
48
-
49
- ### 4. Systematic Expansion
50
-
51
- What broader problems does this bug reveal?
52
-
53
- - **Similar Issues**: Where else might this problem exist?
54
- - **Design Flaw**: Is there a fundamental architecture issue?
55
- - **Process Flaw**: Is there a development process improvement?
56
- - **Knowledge Gap**: Is the team missing some understanding?
57
-
58
- ### 5. Knowledge Capture
59
-
60
- Solidify insights into the system:
61
-
62
- - [ ] Update `.trellis/spec/guides/` thinking guides
63
- - [ ] Update `.trellis/spec/backend/` or `frontend/` docs
64
- - [ ] Create issue record (if applicable)
65
- - [ ] Create feature ticket for root fix
66
- - [ ] Update check commands if needed
67
-
68
- ---
69
-
70
- ## Output Format
71
-
72
- Please output analysis in this format:
73
-
74
- ```markdown
75
- ## Bug Analysis: [Short Description]
76
-
77
- ### 1. Root Cause Category
78
- - **Category**: [A/B/C/D/E] - [Category Name]
79
- - **Specific Cause**: [Detailed description]
80
-
81
- ### 2. Why Fixes Failed (if applicable)
82
- 1. [First attempt]: [Why it failed]
83
- 2. [Second attempt]: [Why it failed]
84
- ...
85
-
86
- ### 3. Prevention Mechanisms
87
- | Priority | Mechanism | Specific Action | Status |
88
- |----------|-----------|-----------------|--------|
89
- | P0 | ... | ... | TODO/DONE |
90
-
91
- ### 4. Systematic Expansion
92
- - **Similar Issues**: [List places with similar problems]
93
- - **Design Improvement**: [Architecture-level suggestions]
94
- - **Process Improvement**: [Development process suggestions]
95
-
96
- ### 5. Knowledge Capture
97
- - [ ] [Documents to update / tickets to create]
98
- ```
99
-
100
- ---
101
-
102
- ## Core Philosophy
103
-
104
- > **The value of debugging is not in fixing the bug, but in making this class of bugs never happen again.**
105
-
106
- Three levels of insight:
107
- 1. **Tactical**: How to fix THIS bug
108
- 2. **Strategic**: How to prevent THIS CLASS of bugs
109
- 3. **Philosophical**: How to expand thinking patterns
110
-
111
- 30 minutes of analysis saves 30 hours of future debugging.
112
-
113
- ---
114
-
115
- ## After Analysis: Immediate Actions
116
-
117
- **IMPORTANT**: After completing the analysis above, you MUST immediately:
118
-
119
- 1. **Update spec/guides** - Don't just list TODOs, actually update the relevant files:
120
- - If it's a cross-platform issue �?update `cross-platform-thinking-guide.md`
121
- - If it's a cross-layer issue �?update `cross-layer-thinking-guide.md`
122
- - If it's a code reuse issue �?update `code-reuse-thinking-guide.md`
123
- - If it's domain-specific �?update `backend/*.md` or `frontend/*.md`
124
-
125
- 2. **Sync templates** - After updating `.trellis/spec/`, sync to `src/templates/markdown/spec/`
126
-
127
- 3. **Commit the spec updates** - This is the primary output, not just the analysis text
128
-
129
- > **The analysis is worthless if it stays in chat. The value is in the updated specs.**
@@ -1,170 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: Cross-Layer Check"
3
- ---
4
-
5
- # Cross-Layer Check
6
-
7
- Check if your changes considered all dimensions. Most bugs come from "didn't think of it", not lack of technical skill.
8
-
9
- > **Note**: This is a **post-implementation** safety net. Ideally, read the [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) **before** writing code.
10
-
11
- ---
12
-
13
- ## Related Documents
14
-
15
- | Document | Purpose | Timing |
16
- |----------|---------|--------|
17
- | [Pre-Implementation Checklist](.trellis/spec/guides/pre-implementation-checklist.md) | Questions before coding | **Before** writing code |
18
- | [Code Reuse Thinking Guide](.trellis/spec/guides/code-reuse-thinking-guide.md) | Pattern recognition | During implementation |
19
- | **`/`** (this) | Verification check | **After** implementation |
20
-
21
- ---
22
-
23
- ## Execution Steps
24
-
25
- ### 1. Identify Change Scope
26
-
27
- ```bash
28
- git status
29
- git diff --name-only
30
- ```
31
-
32
- ### 2. Select Applicable Check Dimensions
33
-
34
- Based on your change type, execute relevant checks below:
35
-
36
- ---
37
-
38
- ## Dimension A: Cross-Layer Data Flow (Required when 3+ layers)
39
-
40
- **Trigger**: Changes involve 3 or more layers
41
-
42
- | Layer | Common Locations |
43
- |-------|------------------|
44
- | API/Routes | `routes/`, `api/`, `handlers/`, `controllers/` |
45
- | Service/Business Logic | `services/`, `lib/`, `core/`, `domain/` |
46
- | Database/Storage | `db/`, `models/`, `repositories/`, `schema/` |
47
- | UI/Presentation | `components/`, `views/`, `templates/`, `pages/` |
48
- | Utility | `utils/`, `helpers/`, `common/` |
49
-
50
- **Checklist**:
51
- - [ ] Read flow: Database -> Service -> API -> UI
52
- - [ ] Write flow: UI -> API -> Service -> Database
53
- - [ ] Types/schemas correctly passed between layers?
54
- - [ ] Errors properly propagated to caller?
55
- - [ ] Loading/pending states handled at each layer?
56
-
57
- **Detailed Guide**: `.trellis/spec/guides/cross-layer-thinking-guide.md`
58
-
59
- ---
60
-
61
- ## Dimension B: Code Reuse (Required when modifying constants/config)
62
-
63
- **Trigger**:
64
- - Modifying UI constants (label, icon, color)
65
- - Modifying any hardcoded value
66
- - Seeing similar code in multiple places
67
- - Creating a new utility/helper function
68
- - Just finished batch modifications across files
69
-
70
- **Checklist**:
71
- - [ ] Search first: How many places define this value?
72
- ```bash
73
- # Search in source files (adjust extensions for your project)
74
- grep -r "value-to-change" src/
75
- ```
76
- - [ ] If the same value repeats -> does it represent one stable concept whose callers must change together? Extract only then. Two literals that merely happen to match today should stay separate
77
- - [ ] After modification, all usage sites updated?
78
- - [ ] If creating utility: Does similar utility already exist?
79
-
80
- **Detailed Guide**: `.trellis/spec/guides/code-reuse-thinking-guide.md`
81
-
82
- ---
83
-
84
- ## Dimension B2: New Utility Functions
85
-
86
- **Trigger**: About to create a new utility/helper function
87
-
88
- **Checklist**:
89
- - [ ] Search for existing similar utilities first
90
- ```bash
91
- grep -r "functionNamePattern" src/
92
- ```
93
- - [ ] If similar exists, can you extend it instead?
94
- - [ ] If creating new, is it in the right location (shared vs domain-specific)?
95
-
96
- ---
97
-
98
- ## Dimension B3: After Batch Modifications
99
-
100
- **Trigger**: Just modified similar patterns in multiple files
101
-
102
- **Checklist**:
103
- - [ ] Did you check ALL files with similar patterns?
104
- ```bash
105
- grep -r "patternYouChanged" src/
106
- ```
107
- - [ ] Any files missed that should also be updated?
108
- - [ ] Do the repeated sites represent one stable concept whose callers must change together? Abstract only then — not to pre-empt duplication that has not happened.
109
-
110
- ---
111
-
112
- ## Dimension C: Import/Dependency Paths (Required when creating new files)
113
-
114
- **Trigger**: Creating new source files
115
-
116
- **Checklist**:
117
- - [ ] Using correct import paths (relative vs absolute)?
118
- - [ ] No circular dependencies?
119
- - [ ] Consistent with project's module organization?
120
-
121
- ---
122
-
123
- ## Dimension D: Same-Layer Consistency
124
-
125
- **Trigger**:
126
- - Modifying display logic or formatting
127
- - Same domain concept used in multiple places
128
-
129
- **Checklist**:
130
- - [ ] Search for other places using same concept
131
- ```bash
132
- grep -r "ConceptName" src/
133
- ```
134
- - [ ] Are these usages consistent?
135
- - [ ] Should they share configuration/constants?
136
-
137
- ---
138
-
139
- ## Dimension E: Scope Discipline (Always applicable)
140
-
141
- **Trigger**: Every change, before reporting done
142
-
143
- **Checklist**:
144
- - [ ] Any tidying of code the task did not require?
145
- - [ ] Any abstraction, config or extension point added for a case that does not exist yet?
146
- - [ ] Any speculative fallback for a state that cannot occur?
147
- - [ ] Any file changed that the acceptance criteria do not mention?
148
- - [ ] Any workaround added at the caller instead of a fix where the behavior actually lives?
149
-
150
- ---
151
-
152
- ## Common Issues Quick Reference
153
-
154
- | Issue | Root Cause | Prevention |
155
- |-------|------------|------------|
156
- | Changed one place, missed others | Didn't search impact scope | `grep` before changing |
157
- | Data lost at some layer | Didn't check data flow | Trace data source to destination |
158
- | Type/schema mismatch | Cross-layer types inconsistent | Use shared type definitions |
159
- | UI/output inconsistent | Same concept in multiple places | Extract shared constants |
160
- | Similar utility exists | Didn't search first | Search before creating |
161
- | Batch fix incomplete | Didn't verify all occurrences | grep after fixing |
162
-
163
- ---
164
-
165
- ## Output
166
-
167
- Report:
168
- 1. Which dimensions your changes involve
169
- 2. Check results for each dimension
170
- 3. Issues found and fix suggestions
@@ -1,110 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: check.prompt"
3
- ---
4
-
5
- # Code Quality Check
6
-
7
- Comprehensive quality verification for recently written code. Combines spec compliance, cross-layer safety, and pre-commit checks.
8
-
9
- ---
10
-
11
- ## Step 1: Identify What Changed
12
-
13
- ```bash
14
- git diff --name-only HEAD
15
- git status
16
- ```
17
-
18
- ## Step 2: Read Task Artifacts and Applicable Specs
19
-
20
- Read the current task artifacts in order:
21
-
22
- - `prd.md`
23
- - `design.md` if present
24
- - `implement.md` if present
25
-
26
- ```bash
27
- python3 ./.trellis/scripts/get_context.py --mode packages
28
- ```
29
-
30
- For each changed package/layer, read the spec index and follow its **Quality Check** section:
31
-
32
- ```bash
33
- cat .trellis/spec/<package>/<layer>/index.md
34
- ```
35
-
36
- Read the specific guideline files referenced — the index is a pointer, not the goal.
37
-
38
- ## Step 3: Run Project Checks
39
-
40
- Run the project's lint, type-check, and test commands. Fix any failures before proceeding.
41
-
42
- ## Step 4: Review Against Checklist
43
-
44
- ### Code Quality
45
-
46
- - [ ] Linter passes?
47
- - [ ] Type checker passes (if applicable)?
48
- - [ ] Tests pass?
49
- - [ ] No debug logging left in?
50
- - [ ] No suppressed warnings or type-safety bypasses?
51
-
52
- ### Test Coverage
53
-
54
- - [ ] New function → unit test added?
55
- - [ ] Bug fix → regression test added?
56
- - [ ] Changed behavior → existing tests updated?
57
-
58
- ### Spec Sync
59
-
60
- - [ ] Does `.trellis/spec/` need updates? (new patterns, conventions, lessons learned)
61
-
62
- > "If I fixed a bug or discovered something non-obvious, should I document it so future me won't hit the same issue?" → If YES, update the relevant spec doc.
63
-
64
- ### Scope Discipline
65
-
66
- - [ ] Any tidying of code the task did not require?
67
- - [ ] Any abstraction, config or extension point added for a case that does not exist yet?
68
- - [ ] Any speculative fallback for a state that cannot occur?
69
- - [ ] Any file changed that the acceptance criteria do not mention?
70
- - [ ] Any workaround added at the caller instead of a fix where the behavior actually lives?
71
-
72
- ## Step 5: Cross-Layer Dimensions (if applicable)
73
-
74
- Skip this step if your change is confined to a single layer.
75
-
76
- ### A. Data Flow (changes touch 3+ layers)
77
-
78
- - [ ] Read flow traces correctly: Storage → Service → API → UI
79
- - [ ] Write flow traces correctly: UI → API → Service → Storage
80
- - [ ] Types/schemas correctly passed between layers?
81
- - [ ] Errors properly propagated to caller?
82
-
83
- ### B. Code Reuse (modifying constants, creating utilities)
84
-
85
- - [ ] Searched for existing similar code before creating new?
86
- ```bash
87
- grep -r "pattern" src/
88
- ```
89
- - [ ] If the same value repeats, does it represent one stable concept whose callers must change together? Extract only then — two literals that merely happen to match today should stay separate.
90
- - [ ] After batch modification, all occurrences updated?
91
-
92
- ### C. Import/Dependency (creating new files)
93
-
94
- - [ ] Correct import paths (relative vs absolute)?
95
- - [ ] No circular dependencies?
96
-
97
- ### D. Same-Layer Consistency
98
-
99
- - [ ] Other places using the same concept are consistent?
100
-
101
- ---
102
-
103
- ## Step 6: Report and Fix
104
-
105
- Report every violation you find. Then:
106
-
107
- - Mechanical and local (lint nit, missing type, wrong import, dead branch, failing assertion) → fix in place, then re-run project checks.
108
- - Design or judgment (naming a shared concept, moving a module boundary, changing a public interface, reassigning where behavior lives) → record the evidence and your recommendation, and stop. Do not rewrite it silently.
109
-
110
- If a fix would touch files outside the current task's scope, say so and stop instead of widening the change.
@@ -1,116 +0,0 @@
1
- ---
2
- description: "Trellis Copilot prompt: Create New Copilot Prompt"
3
- ---
4
-
5
- # Create New Copilot Prompt
6
-
7
- Create a new Copilot slash-command prompt file in `.github/prompts/`.
8
-
9
- ## Usage
10
-
11
- ```
12
- /create-command <command-name> <description>
13
- ```
14
-
15
- Example:
16
-
17
- ```
18
- /create-command review-pr Check PR code changes against project guidelines
19
- ```
20
-
21
- ## Execution Steps
22
-
23
- ### 1. Parse Input
24
-
25
- Extract from user input:
26
- - Command name: must be kebab-case (example: `review-pr`)
27
- - Description: one-sentence purpose
28
-
29
- ### 2. Analyze Requirements
30
-
31
- Classify the command intent:
32
- - Initialization
33
- - Pre-development check
34
- - Quality check
35
- - Session recording
36
- - Generation / automation
37
-
38
- ### 3. Generate Prompt Content
39
-
40
- Create concise, executable Markdown content.
41
-
42
- Simple prompt shape:
43
-
44
- ```markdown
45
- Single clear instruction with expected output.
46
- ```
47
-
48
- Complex prompt shape:
49
-
50
- ```markdown
51
- # Prompt Title
52
-
53
- Short purpose.
54
-
55
- ## Steps
56
-
57
- ### 1. Step One
58
- Concrete action.
59
-
60
- ### 2. Step Two
61
- Concrete action.
62
-
63
- ## Output
64
-
65
- Expected output format.
66
- ```
67
-
68
- ### 4. Create Prompt File
69
-
70
- Write file:
71
-
72
- - `.github/prompts/<command-name>.prompt.md`
73
-
74
- If the file already exists, compare content and update only when user asks to overwrite.
75
-
76
- ### 5. Confirm Result
77
-
78
- Output:
79
-
80
- ```
81
- [OK] Created Copilot Prompt: /<command-name>
82
-
83
- File path:
84
- - .github/prompts/<command-name>.prompt.md
85
-
86
- Usage:
87
- /<command-name>
88
-
89
- Description:
90
- <description>
91
- ```
92
-
93
- ## Content Quality Guidelines
94
-
95
- Good prompt traits:
96
- 1. Clear and concise
97
- 2. Actionable without extra interpretation
98
- 3. Properly scoped
99
- 4. Defines expected output when needed
100
-
101
- Avoid:
102
- 1. Vague intent (example: "optimize code")
103
- 2. Overly long instructions with mixed goals
104
- 3. Duplicating existing prompt behavior without reason
105
-
106
- ## Naming Conventions
107
-
108
- | Prompt Type | Prefix | Example |
109
- |------------|--------|---------|
110
- | Session Start | `start` | `start` |
111
- | Pre-development | `before-` | `before-dev` |
112
- | Check | `check-` | `check` |
113
- | Record | `record-` | `record-session` |
114
- | Generate | `generate-` | `generate-api-doc` |
115
- | Update | `update-` | `update-changelog` |
116
- | Other | verb-first | `review-code`, `sync-data` |
@@ -1,22 +0,0 @@
1
- ---
2
- description: "Record progress in the Trellis developer session journal."
3
- ---
4
-
5
- # Finish Work
6
-
7
- Record progress in the developer session journal when ending this session. This prompt does not change task status, phase state, or implementation authorization. Task completion and cancellation are handled during Delivery Review and On-Site Closeout Phase through Trellis CLI.
8
-
9
- ## Review the current session
10
-
11
- python3 ./.trellis/scripts/get_context.py --mode record
12
-
13
- Review the current task, repository changes, and recent commits. Make the journal summary clear about completed work, remaining work, and blockers. A clean working tree or committed changes do not by themselves mean the task is complete.
14
-
15
- ## Record the journal
16
-
17
- python3 ./.trellis/scripts/add_session.py \
18
- --title "Session title" \
19
- --commit "hash1,hash2" \
20
- --summary "Progress, remaining work, and blockers"
21
-
22
- Pass only commit hashes that belong to this session. Omit --commit when no relevant commit exists. Leave task state to Trellis CLI and formal session handoff to its separate, explicitly requested workflow.