@mindfoldhq/trellis 0.3.10 → 0.4.0-beta.10

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 (304) hide show
  1. package/README.md +19 -5
  2. package/dist/cli/index.js +5 -0
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/commands/init.d.ts +4 -0
  5. package/dist/commands/init.d.ts.map +1 -1
  6. package/dist/commands/init.js +240 -43
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/update.d.ts.map +1 -1
  9. package/dist/commands/update.js +206 -47
  10. package/dist/commands/update.js.map +1 -1
  11. package/dist/configurators/codebuddy.d.ts +11 -0
  12. package/dist/configurators/codebuddy.d.ts.map +1 -0
  13. package/dist/configurators/codebuddy.js +58 -0
  14. package/dist/configurators/codebuddy.js.map +1 -0
  15. package/dist/configurators/codex.d.ts +7 -4
  16. package/dist/configurators/codex.d.ts.map +1 -1
  17. package/dist/configurators/codex.js +40 -10
  18. package/dist/configurators/codex.js.map +1 -1
  19. package/dist/configurators/copilot.d.ts +9 -0
  20. package/dist/configurators/copilot.d.ts.map +1 -0
  21. package/dist/configurators/copilot.js +34 -0
  22. package/dist/configurators/copilot.js.map +1 -0
  23. package/dist/configurators/index.d.ts +11 -1
  24. package/dist/configurators/index.d.ts.map +1 -1
  25. package/dist/configurators/index.js +72 -4
  26. package/dist/configurators/index.js.map +1 -1
  27. package/dist/configurators/opencode.d.ts +1 -1
  28. package/dist/configurators/opencode.js +1 -1
  29. package/dist/configurators/windsurf.d.ts +8 -0
  30. package/dist/configurators/windsurf.d.ts.map +1 -0
  31. package/dist/configurators/windsurf.js +18 -0
  32. package/dist/configurators/windsurf.js.map +1 -0
  33. package/dist/configurators/workflow.d.ts +6 -2
  34. package/dist/configurators/workflow.d.ts.map +1 -1
  35. package/dist/configurators/workflow.js +90 -58
  36. package/dist/configurators/workflow.js.map +1 -1
  37. package/dist/migrations/index.d.ts +1 -0
  38. package/dist/migrations/index.d.ts.map +1 -1
  39. package/dist/migrations/index.js +2 -0
  40. package/dist/migrations/index.js.map +1 -1
  41. package/dist/migrations/manifests/0.4.0-beta.1.json +228 -0
  42. package/dist/migrations/manifests/0.4.0-beta.10.json +9 -0
  43. package/dist/migrations/manifests/0.4.0-beta.2.json +9 -0
  44. package/dist/migrations/manifests/0.4.0-beta.3.json +9 -0
  45. package/dist/migrations/manifests/0.4.0-beta.4.json +9 -0
  46. package/dist/migrations/manifests/0.4.0-beta.5.json +9 -0
  47. package/dist/migrations/manifests/0.4.0-beta.6.json +9 -0
  48. package/dist/migrations/manifests/0.4.0-beta.7.json +9 -0
  49. package/dist/migrations/manifests/0.4.0-beta.8.json +34 -0
  50. package/dist/migrations/manifests/0.4.0-beta.9.json +9 -0
  51. package/dist/templates/claude/agents/dispatch.md +1 -2
  52. package/dist/templates/claude/agents/implement.md +2 -3
  53. package/dist/templates/claude/commands/trellis/before-dev.md +29 -0
  54. package/dist/templates/claude/commands/trellis/check.md +25 -0
  55. package/dist/templates/claude/commands/trellis/create-command.md +2 -2
  56. package/dist/templates/claude/commands/trellis/onboard.md +13 -13
  57. package/dist/templates/claude/commands/trellis/parallel.md +1 -2
  58. package/dist/templates/claude/commands/trellis/record-session.md +3 -2
  59. package/dist/templates/claude/commands/trellis/start.md +8 -4
  60. package/dist/templates/claude/hooks/inject-subagent-context.py +29 -14
  61. package/dist/templates/claude/hooks/ralph-loop.py +18 -10
  62. package/dist/templates/claude/hooks/session-start.py +201 -9
  63. package/dist/templates/claude/hooks/statusline.py +211 -0
  64. package/dist/templates/claude/settings.json +4 -0
  65. package/dist/templates/codebuddy/commands/trellis/before-dev.md +29 -0
  66. package/dist/templates/codebuddy/commands/trellis/brainstorm.md +487 -0
  67. package/dist/templates/codebuddy/commands/trellis/break-loop.md +107 -0
  68. package/dist/templates/codebuddy/commands/trellis/check-cross-layer.md +153 -0
  69. package/dist/templates/codebuddy/commands/trellis/check.md +25 -0
  70. package/dist/templates/codebuddy/commands/trellis/create-command.md +154 -0
  71. package/dist/templates/codebuddy/commands/trellis/finish-work.md +143 -0
  72. package/dist/templates/codebuddy/commands/trellis/integrate-skill.md +219 -0
  73. package/dist/templates/codebuddy/commands/trellis/onboard.md +358 -0
  74. package/dist/templates/codebuddy/commands/trellis/record-session.md +61 -0
  75. package/dist/templates/codebuddy/commands/trellis/start.md +373 -0
  76. package/dist/templates/codebuddy/commands/trellis/update-spec.md +354 -0
  77. package/dist/templates/codebuddy/index.d.ts +25 -0
  78. package/dist/templates/codebuddy/index.d.ts.map +1 -0
  79. package/dist/templates/codebuddy/index.js +45 -0
  80. package/dist/templates/codebuddy/index.js.map +1 -0
  81. package/dist/templates/codex/agents/check.toml +23 -0
  82. package/dist/templates/codex/agents/implement.toml +19 -0
  83. package/dist/templates/codex/agents/research.toml +26 -0
  84. package/dist/templates/codex/codex-skills/parallel/SKILL.md +194 -0
  85. package/dist/templates/codex/config.toml +5 -0
  86. package/dist/templates/codex/hooks/session-start.py +228 -0
  87. package/dist/templates/codex/hooks.json +16 -0
  88. package/dist/templates/codex/index.d.ts +27 -5
  89. package/dist/templates/codex/index.d.ts.map +1 -1
  90. package/dist/templates/codex/index.js +60 -8
  91. package/dist/templates/codex/index.js.map +1 -1
  92. package/dist/templates/codex/skills/before-dev/SKILL.md +34 -0
  93. package/dist/templates/codex/skills/brainstorm/SKILL.md +1 -1
  94. package/dist/templates/codex/skills/break-loop/SKILL.md +1 -1
  95. package/dist/templates/codex/skills/check/SKILL.md +30 -0
  96. package/dist/templates/codex/skills/check-cross-layer/SKILL.md +1 -1
  97. package/dist/templates/codex/skills/create-command/SKILL.md +3 -3
  98. package/dist/templates/codex/skills/finish-work/SKILL.md +1 -1
  99. package/dist/templates/codex/skills/improve-ut/SKILL.md +69 -0
  100. package/dist/templates/codex/skills/integrate-skill/SKILL.md +1 -1
  101. package/dist/templates/codex/skills/onboard/SKILL.md +12 -12
  102. package/dist/templates/codex/skills/record-session/SKILL.md +4 -3
  103. package/dist/templates/codex/skills/start/SKILL.md +9 -4
  104. package/dist/templates/codex/skills/update-spec/SKILL.md +1 -1
  105. package/dist/templates/copilot/hooks/session-start.py +218 -0
  106. package/dist/templates/copilot/hooks.json +11 -0
  107. package/dist/templates/copilot/index.d.ts +23 -0
  108. package/dist/templates/copilot/index.d.ts.map +1 -0
  109. package/dist/templates/copilot/index.js +54 -0
  110. package/dist/templates/copilot/index.js.map +1 -0
  111. package/dist/templates/copilot/prompts/before-dev.prompt.md +33 -0
  112. package/dist/templates/copilot/prompts/brainstorm.prompt.md +491 -0
  113. package/dist/templates/copilot/prompts/break-loop.prompt.md +129 -0
  114. package/dist/templates/copilot/prompts/check-cross-layer.prompt.md +157 -0
  115. package/dist/templates/copilot/prompts/check.prompt.md +29 -0
  116. package/dist/templates/copilot/prompts/create-command.prompt.md +116 -0
  117. package/dist/templates/copilot/prompts/finish-work.prompt.md +157 -0
  118. package/dist/templates/copilot/prompts/integrate-skill.prompt.md +223 -0
  119. package/dist/templates/copilot/prompts/onboard.prompt.md +362 -0
  120. package/dist/templates/copilot/prompts/parallel.prompt.md +196 -0
  121. package/dist/templates/copilot/prompts/record-session.prompt.md +66 -0
  122. package/dist/templates/copilot/prompts/start.prompt.md +397 -0
  123. package/dist/templates/copilot/prompts/update-spec.prompt.md +358 -0
  124. package/dist/templates/cursor/commands/trellis-before-dev.md +29 -0
  125. package/dist/templates/cursor/commands/trellis-check.md +25 -0
  126. package/dist/templates/cursor/commands/trellis-create-command.md +2 -2
  127. package/dist/templates/cursor/commands/trellis-onboard.md +13 -13
  128. package/dist/templates/cursor/commands/trellis-record-session.md +3 -2
  129. package/dist/templates/cursor/commands/trellis-start.md +7 -16
  130. package/dist/templates/extract.d.ts +36 -0
  131. package/dist/templates/extract.d.ts.map +1 -1
  132. package/dist/templates/extract.js +64 -0
  133. package/dist/templates/extract.js.map +1 -1
  134. package/dist/templates/gemini/commands/trellis/before-dev.toml +33 -0
  135. package/dist/templates/gemini/commands/trellis/check.toml +29 -0
  136. package/dist/templates/gemini/commands/trellis/create-command.toml +2 -2
  137. package/dist/templates/gemini/commands/trellis/onboard.toml +2 -2
  138. package/dist/templates/gemini/commands/trellis/record-session.toml +3 -2
  139. package/dist/templates/gemini/commands/trellis/start.toml +9 -4
  140. package/dist/templates/iflow/agents/dispatch.md +1 -2
  141. package/dist/templates/iflow/agents/implement.md +2 -3
  142. package/dist/templates/iflow/commands/trellis/before-dev.md +29 -0
  143. package/dist/templates/iflow/commands/trellis/check.md +25 -0
  144. package/dist/templates/iflow/commands/trellis/create-command.md +2 -2
  145. package/dist/templates/iflow/commands/trellis/onboard.md +13 -13
  146. package/dist/templates/iflow/commands/trellis/parallel.md +1 -2
  147. package/dist/templates/iflow/commands/trellis/record-session.md +3 -2
  148. package/dist/templates/iflow/commands/trellis/start.md +8 -4
  149. package/dist/templates/iflow/hooks/inject-subagent-context.py +29 -14
  150. package/dist/templates/iflow/hooks/ralph-loop.py +8 -1
  151. package/dist/templates/iflow/hooks/session-start.py +187 -8
  152. package/dist/templates/kilo/workflows/before-dev.md +29 -0
  153. package/dist/templates/kilo/workflows/check.md +25 -0
  154. package/dist/templates/kilo/workflows/create-command.md +2 -2
  155. package/dist/templates/kilo/workflows/onboard.md +13 -13
  156. package/dist/templates/kilo/workflows/parallel.md +1 -2
  157. package/dist/templates/kilo/workflows/record-session.md +3 -2
  158. package/dist/templates/kilo/workflows/start.md +8 -3
  159. package/dist/templates/kiro/skills/before-dev/SKILL.md +34 -0
  160. package/dist/templates/kiro/skills/brainstorm/SKILL.md +1 -1
  161. package/dist/templates/kiro/skills/break-loop/SKILL.md +1 -1
  162. package/dist/templates/kiro/skills/check/SKILL.md +30 -0
  163. package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +1 -1
  164. package/dist/templates/kiro/skills/create-command/SKILL.md +3 -3
  165. package/dist/templates/kiro/skills/finish-work/SKILL.md +1 -1
  166. package/dist/templates/kiro/skills/integrate-skill/SKILL.md +1 -1
  167. package/dist/templates/kiro/skills/onboard/SKILL.md +12 -12
  168. package/dist/templates/kiro/skills/record-session/SKILL.md +4 -3
  169. package/dist/templates/kiro/skills/start/SKILL.md +9 -4
  170. package/dist/templates/kiro/skills/update-spec/SKILL.md +1 -1
  171. package/dist/templates/markdown/agents.md +4 -0
  172. package/dist/templates/markdown/spec/backend/directory-structure.md +1 -1
  173. package/dist/templates/markdown/spec/backend/script-conventions.md +93 -0
  174. package/dist/templates/markdown/workspace-index.md +2 -0
  175. package/dist/templates/opencode/agents/dispatch.md +21 -21
  176. package/dist/templates/opencode/agents/implement.md +2 -2
  177. package/dist/templates/opencode/agents/research.md +1 -2
  178. package/dist/templates/opencode/commands/trellis/before-dev.md +29 -0
  179. package/dist/templates/opencode/commands/trellis/check.md +25 -0
  180. package/dist/templates/opencode/commands/trellis/create-command.md +2 -2
  181. package/dist/templates/opencode/commands/trellis/onboard.md +13 -13
  182. package/dist/templates/opencode/commands/trellis/parallel.md +1 -2
  183. package/dist/templates/opencode/commands/trellis/record-session.md +3 -2
  184. package/dist/templates/opencode/commands/trellis/start.md +8 -3
  185. package/dist/templates/opencode/lib/trellis-context.js +42 -2
  186. package/dist/templates/opencode/{plugin → plugins}/inject-subagent-context.js +45 -18
  187. package/dist/templates/opencode/{plugin → plugins}/session-start.js +156 -28
  188. package/dist/templates/qoder/skills/before-dev/SKILL.md +34 -0
  189. package/dist/templates/qoder/skills/brainstorm/SKILL.md +1 -1
  190. package/dist/templates/qoder/skills/break-loop/SKILL.md +1 -1
  191. package/dist/templates/qoder/skills/check/SKILL.md +30 -0
  192. package/dist/templates/qoder/skills/check-cross-layer/SKILL.md +1 -1
  193. package/dist/templates/qoder/skills/create-command/SKILL.md +3 -3
  194. package/dist/templates/qoder/skills/finish-work/SKILL.md +1 -1
  195. package/dist/templates/qoder/skills/integrate-skill/SKILL.md +1 -1
  196. package/dist/templates/qoder/skills/onboard/SKILL.md +14 -14
  197. package/dist/templates/qoder/skills/record-session/SKILL.md +4 -3
  198. package/dist/templates/qoder/skills/start/SKILL.md +9 -4
  199. package/dist/templates/qoder/skills/update-spec/SKILL.md +1 -1
  200. package/dist/templates/trellis/config.yaml +20 -0
  201. package/dist/templates/trellis/index.d.ts +11 -0
  202. package/dist/templates/trellis/index.d.ts.map +1 -1
  203. package/dist/templates/trellis/index.js +22 -0
  204. package/dist/templates/trellis/index.js.map +1 -1
  205. package/dist/templates/trellis/scripts/add_session.py +111 -13
  206. package/dist/templates/trellis/scripts/common/__init__.py +2 -0
  207. package/dist/templates/trellis/scripts/common/cli_adapter.py +164 -64
  208. package/dist/templates/trellis/scripts/common/config.py +192 -0
  209. package/dist/templates/trellis/scripts/common/developer.py +2 -2
  210. package/dist/templates/trellis/scripts/common/git.py +31 -0
  211. package/dist/templates/trellis/scripts/common/git_context.py +23 -586
  212. package/dist/templates/trellis/scripts/common/io.py +37 -0
  213. package/dist/templates/trellis/scripts/common/log.py +45 -0
  214. package/dist/templates/trellis/scripts/common/packages_context.py +238 -0
  215. package/dist/templates/trellis/scripts/common/paths.py +103 -6
  216. package/dist/templates/trellis/scripts/common/phase.py +50 -49
  217. package/dist/templates/trellis/scripts/common/registry.py +41 -72
  218. package/dist/templates/trellis/scripts/common/session_context.py +562 -0
  219. package/dist/templates/trellis/scripts/common/task_context.py +410 -0
  220. package/dist/templates/trellis/scripts/common/task_queue.py +27 -98
  221. package/dist/templates/trellis/scripts/common/task_store.py +536 -0
  222. package/dist/templates/trellis/scripts/common/task_utils.py +106 -10
  223. package/dist/templates/trellis/scripts/common/tasks.py +109 -0
  224. package/dist/templates/trellis/scripts/common/types.py +112 -0
  225. package/dist/templates/trellis/scripts/create_bootstrap.py +32 -27
  226. package/dist/templates/trellis/scripts/hooks/linear_sync.py +243 -0
  227. package/dist/templates/trellis/scripts/multi_agent/_bootstrap.py +17 -0
  228. package/dist/templates/trellis/scripts/multi_agent/cleanup.py +43 -48
  229. package/dist/templates/trellis/scripts/multi_agent/create_pr.py +336 -45
  230. package/dist/templates/trellis/scripts/multi_agent/plan.py +9 -32
  231. package/dist/templates/trellis/scripts/multi_agent/start.py +142 -68
  232. package/dist/templates/trellis/scripts/multi_agent/status.py +12 -753
  233. package/dist/templates/trellis/scripts/multi_agent/status_display.py +542 -0
  234. package/dist/templates/trellis/scripts/multi_agent/status_monitor.py +225 -0
  235. package/dist/templates/trellis/scripts/task.py +51 -976
  236. package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +1 -1
  237. package/dist/templates/trellis/workflow.md +38 -38
  238. package/dist/templates/windsurf/index.d.ts +21 -0
  239. package/dist/templates/windsurf/index.d.ts.map +1 -0
  240. package/dist/templates/windsurf/index.js +44 -0
  241. package/dist/templates/windsurf/index.js.map +1 -0
  242. package/dist/templates/windsurf/workflows/trellis-before-dev.md +31 -0
  243. package/dist/templates/windsurf/workflows/trellis-brainstorm.md +491 -0
  244. package/dist/templates/windsurf/workflows/trellis-break-loop.md +111 -0
  245. package/dist/templates/windsurf/workflows/trellis-check-cross-layer.md +157 -0
  246. package/dist/templates/windsurf/workflows/trellis-check.md +27 -0
  247. package/dist/templates/windsurf/workflows/trellis-create-command.md +154 -0
  248. package/dist/templates/windsurf/workflows/trellis-finish-work.md +147 -0
  249. package/dist/templates/windsurf/workflows/trellis-integrate-skill.md +220 -0
  250. package/dist/templates/windsurf/workflows/trellis-onboard.md +362 -0
  251. package/dist/templates/windsurf/workflows/trellis-record-session.md +66 -0
  252. package/dist/templates/windsurf/workflows/trellis-start.md +373 -0
  253. package/dist/templates/windsurf/workflows/trellis-update-spec.md +358 -0
  254. package/dist/types/ai-tools.d.ts +15 -3
  255. package/dist/types/ai-tools.d.ts.map +1 -1
  256. package/dist/types/ai-tools.js +42 -2
  257. package/dist/types/ai-tools.js.map +1 -1
  258. package/dist/types/migration.d.ts +3 -1
  259. package/dist/types/migration.d.ts.map +1 -1
  260. package/dist/utils/project-detector.d.ts +28 -0
  261. package/dist/utils/project-detector.d.ts.map +1 -1
  262. package/dist/utils/project-detector.js +371 -0
  263. package/dist/utils/project-detector.js.map +1 -1
  264. package/dist/utils/template-fetcher.d.ts +19 -6
  265. package/dist/utils/template-fetcher.d.ts.map +1 -1
  266. package/dist/utils/template-fetcher.js +99 -17
  267. package/dist/utils/template-fetcher.js.map +1 -1
  268. package/package.json +1 -1
  269. package/dist/templates/claude/commands/trellis/before-backend-dev.md +0 -13
  270. package/dist/templates/claude/commands/trellis/before-frontend-dev.md +0 -13
  271. package/dist/templates/claude/commands/trellis/check-backend.md +0 -13
  272. package/dist/templates/claude/commands/trellis/check-frontend.md +0 -13
  273. package/dist/templates/codex/skills/before-backend-dev/SKILL.md +0 -18
  274. package/dist/templates/codex/skills/before-frontend-dev/SKILL.md +0 -18
  275. package/dist/templates/codex/skills/check-backend/SKILL.md +0 -18
  276. package/dist/templates/codex/skills/check-frontend/SKILL.md +0 -18
  277. package/dist/templates/cursor/commands/trellis-before-backend-dev.md +0 -13
  278. package/dist/templates/cursor/commands/trellis-before-frontend-dev.md +0 -13
  279. package/dist/templates/cursor/commands/trellis-check-backend.md +0 -13
  280. package/dist/templates/cursor/commands/trellis-check-frontend.md +0 -13
  281. package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +0 -17
  282. package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +0 -17
  283. package/dist/templates/gemini/commands/trellis/check-backend.toml +0 -17
  284. package/dist/templates/gemini/commands/trellis/check-frontend.toml +0 -17
  285. package/dist/templates/iflow/commands/trellis/before-backend-dev.md +0 -13
  286. package/dist/templates/iflow/commands/trellis/before-frontend-dev.md +0 -13
  287. package/dist/templates/iflow/commands/trellis/check-backend.md +0 -13
  288. package/dist/templates/iflow/commands/trellis/check-frontend.md +0 -13
  289. package/dist/templates/kilo/workflows/before-backend-dev.md +0 -13
  290. package/dist/templates/kilo/workflows/before-frontend-dev.md +0 -13
  291. package/dist/templates/kilo/workflows/check-backend.md +0 -13
  292. package/dist/templates/kilo/workflows/check-frontend.md +0 -13
  293. package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +0 -18
  294. package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +0 -18
  295. package/dist/templates/kiro/skills/check-backend/SKILL.md +0 -18
  296. package/dist/templates/kiro/skills/check-frontend/SKILL.md +0 -18
  297. package/dist/templates/opencode/commands/trellis/before-backend-dev.md +0 -13
  298. package/dist/templates/opencode/commands/trellis/before-frontend-dev.md +0 -13
  299. package/dist/templates/opencode/commands/trellis/check-backend.md +0 -13
  300. package/dist/templates/opencode/commands/trellis/check-frontend.md +0 -13
  301. package/dist/templates/qoder/skills/before-backend-dev/SKILL.md +0 -18
  302. package/dist/templates/qoder/skills/before-frontend-dev/SKILL.md +0 -18
  303. package/dist/templates/qoder/skills/check-backend/SKILL.md +0 -18
  304. package/dist/templates/qoder/skills/check-frontend/SKILL.md +0 -18
@@ -66,23 +66,47 @@ def run_script(script_path: Path) -> str:
66
66
  return "No context available"
67
67
 
68
68
 
69
+ def _normalize_task_ref(task_ref: str) -> str:
70
+ normalized = task_ref.strip()
71
+ if not normalized:
72
+ return ""
73
+
74
+ path_obj = Path(normalized)
75
+ if path_obj.is_absolute():
76
+ return str(path_obj)
77
+
78
+ normalized = normalized.replace("\\", "/")
79
+ while normalized.startswith("./"):
80
+ normalized = normalized[2:]
81
+
82
+ if normalized.startswith("tasks/"):
83
+ return f".trellis/{normalized}"
84
+
85
+ return normalized
86
+
87
+
88
+ def _resolve_task_dir(trellis_dir: Path, task_ref: str) -> Path:
89
+ normalized = _normalize_task_ref(task_ref)
90
+ path_obj = Path(normalized)
91
+ if path_obj.is_absolute():
92
+ return path_obj
93
+ if normalized.startswith(".trellis/"):
94
+ return trellis_dir.parent / path_obj
95
+ return trellis_dir / "tasks" / path_obj
96
+
97
+
69
98
  def _get_task_status(trellis_dir: Path) -> str:
70
99
  """Check current task status and return structured status string."""
71
100
  current_task_file = trellis_dir / ".current-task"
72
101
  if not current_task_file.is_file():
73
102
  return "Status: NO ACTIVE TASK\nNext: Describe what you want to work on"
74
103
 
75
- task_ref = current_task_file.read_text(encoding="utf-8").strip()
104
+ task_ref = _normalize_task_ref(current_task_file.read_text(encoding="utf-8").strip())
76
105
  if not task_ref:
77
106
  return "Status: NO ACTIVE TASK\nNext: Describe what you want to work on"
78
107
 
79
108
  # Resolve task directory
80
- if Path(task_ref).is_absolute():
81
- task_dir = Path(task_ref)
82
- elif task_ref.startswith(".trellis/"):
83
- task_dir = trellis_dir.parent / task_ref
84
- else:
85
- task_dir = trellis_dir / "tasks" / task_ref
109
+ task_dir = _resolve_task_dir(trellis_dir, task_ref)
86
110
  if not task_dir.is_dir():
87
111
  return f"Status: STALE POINTER\nTask: {task_ref}\nNext: Task directory not found. Run: python3 ./.trellis/scripts/task.py finish"
88
112
 
@@ -120,6 +144,140 @@ def _get_task_status(trellis_dir: Path) -> str:
120
144
  return f"Status: READY\nTask: {task_title}\nNext: Continue with implement or check"
121
145
 
122
146
 
147
+ def _load_trellis_config(trellis_dir: Path) -> tuple:
148
+ """Load Trellis config for session-start decisions.
149
+
150
+ Returns:
151
+ (is_mono, packages_dict, spec_scope, task_pkg, default_pkg)
152
+ """
153
+ scripts_dir = trellis_dir / "scripts"
154
+ if str(scripts_dir) not in sys.path:
155
+ sys.path.insert(0, str(scripts_dir))
156
+
157
+ try:
158
+ from common.config import get_default_package, get_packages, get_spec_scope, is_monorepo # type: ignore[import-not-found]
159
+ from common.paths import get_current_task # type: ignore[import-not-found]
160
+
161
+ repo_root = trellis_dir.parent
162
+ is_mono = is_monorepo(repo_root)
163
+ packages = get_packages(repo_root) or {}
164
+ scope = get_spec_scope(repo_root)
165
+
166
+ # Get active task's package
167
+ task_pkg = None
168
+ current = get_current_task(repo_root)
169
+ if current:
170
+ task_json = repo_root / current / "task.json"
171
+ if task_json.is_file():
172
+ try:
173
+ data = json.loads(task_json.read_text(encoding="utf-8"))
174
+ if isinstance(data, dict):
175
+ tp = data.get("package")
176
+ if isinstance(tp, str) and tp:
177
+ task_pkg = tp
178
+ except (json.JSONDecodeError, OSError):
179
+ pass
180
+
181
+ default_pkg = get_default_package(repo_root)
182
+ return is_mono, packages, scope, task_pkg, default_pkg
183
+ except Exception:
184
+ return False, {}, None, None, None
185
+
186
+
187
+ def _check_legacy_spec(trellis_dir: Path, is_mono: bool, packages: dict) -> str | None:
188
+ """Check for legacy spec directory structure in monorepo."""
189
+ if not is_mono or not packages:
190
+ return None
191
+
192
+ spec_dir = trellis_dir / "spec"
193
+ if not spec_dir.is_dir():
194
+ return None
195
+
196
+ has_legacy = False
197
+ for legacy_name in ("backend", "frontend"):
198
+ legacy_dir = spec_dir / legacy_name
199
+ if legacy_dir.is_dir() and (legacy_dir / "index.md").is_file():
200
+ has_legacy = True
201
+ break
202
+
203
+ if not has_legacy:
204
+ return None
205
+
206
+ missing = [
207
+ name for name in sorted(packages.keys())
208
+ if not (spec_dir / name).is_dir()
209
+ ]
210
+
211
+ if not missing:
212
+ return None
213
+
214
+ if len(missing) == len(packages):
215
+ return (
216
+ f"[!] Legacy spec structure detected: found `spec/backend/` or `spec/frontend/` "
217
+ f"but no package-scoped `spec/<package>/` directories.\n"
218
+ f"Monorepo packages: {', '.join(sorted(packages.keys()))}\n"
219
+ f"Please reorganize: `spec/backend/` -> `spec/<package>/backend/`"
220
+ )
221
+ return (
222
+ f"[!] Partial spec migration detected: packages {', '.join(missing)} "
223
+ f"still missing `spec/<pkg>/` directory.\n"
224
+ f"Please complete migration for all packages."
225
+ )
226
+
227
+
228
+ def _resolve_spec_scope(
229
+ is_mono: bool,
230
+ packages: dict,
231
+ scope,
232
+ task_pkg: str | None,
233
+ default_pkg: str | None,
234
+ ) -> set | None:
235
+ """Resolve which packages should have their specs injected."""
236
+ if not is_mono or not packages:
237
+ return None
238
+
239
+ if scope is None:
240
+ return None
241
+
242
+ if isinstance(scope, str) and scope == "active_task":
243
+ if task_pkg and task_pkg in packages:
244
+ return {task_pkg}
245
+ if default_pkg and default_pkg in packages:
246
+ return {default_pkg}
247
+ return None
248
+
249
+ if isinstance(scope, list):
250
+ valid = set()
251
+ for entry in scope:
252
+ if entry in packages:
253
+ valid.add(entry)
254
+ else:
255
+ print(
256
+ f"Warning: spec_scope contains unknown package: {entry}, ignoring",
257
+ file=sys.stderr,
258
+ )
259
+
260
+ if valid:
261
+ if task_pkg and task_pkg not in valid:
262
+ print(
263
+ f"Warning: active task package '{task_pkg}' is out of configured spec_scope",
264
+ file=sys.stderr,
265
+ )
266
+ return valid
267
+
268
+ print(
269
+ "Warning: all spec_scope entries invalid, falling back to task/default/full",
270
+ file=sys.stderr,
271
+ )
272
+ if task_pkg and task_pkg in packages:
273
+ return {task_pkg}
274
+ if default_pkg and default_pkg in packages:
275
+ return {default_pkg}
276
+ return None
277
+
278
+ return None
279
+
280
+
123
281
  def main():
124
282
  if should_skip_injection():
125
283
  sys.exit(0)
@@ -129,6 +287,10 @@ def main():
129
287
  trellis_dir = project_dir / ".trellis"
130
288
  iflow_dir = project_dir / ".iflow"
131
289
 
290
+ # Load config for scope filtering and legacy detection
291
+ is_mono, packages, scope_config, task_pkg, default_pkg = _load_trellis_config(trellis_dir)
292
+ allowed_pkgs = _resolve_spec_scope(is_mono, packages, scope_config, task_pkg, default_pkg)
293
+
132
294
  output = StringIO()
133
295
 
134
296
  output.write("""<session-context>
@@ -138,6 +300,11 @@ Read and follow all instructions below carefully.
138
300
 
139
301
  """)
140
302
 
303
+ # Legacy migration warning
304
+ legacy_warning = _check_legacy_spec(trellis_dir, is_mono, packages)
305
+ if legacy_warning:
306
+ output.write(f"<migration-warning>\n{legacy_warning}\n</migration-warning>\n\n")
307
+
141
308
  output.write("<current-state>\n")
142
309
  context_script = trellis_dir / "scripts" / "get_context.py"
143
310
  output.write(run_script(context_script))
@@ -157,13 +324,25 @@ Read and follow all instructions below carefully.
157
324
  for sub in sorted(spec_dir.iterdir()):
158
325
  if not sub.is_dir() or sub.name.startswith("."):
159
326
  continue
327
+
328
+ # Always include guides/ regardless of scope
329
+ if sub.name == "guides":
330
+ index_file = sub / "index.md"
331
+ if index_file.is_file():
332
+ output.write(f"## {sub.name}\n")
333
+ output.write(read_file(index_file))
334
+ output.write("\n\n")
335
+ continue
336
+
160
337
  index_file = sub / "index.md"
161
338
  if index_file.is_file():
162
339
  output.write(f"## {sub.name}\n")
163
340
  output.write(read_file(index_file))
164
341
  output.write("\n\n")
165
342
  else:
166
- # Check for nested package dirs (monorepo: spec/<pkg>/<layer>/index.md)
343
+ # Apply scope filter for monorepo packages
344
+ if allowed_pkgs is not None and sub.name not in allowed_pkgs:
345
+ continue
167
346
  for nested in sorted(sub.iterdir()):
168
347
  if not nested.is_dir():
169
348
  continue
@@ -0,0 +1,29 @@
1
+ Read the relevant development guidelines before starting your task.
2
+
3
+ Execute these steps:
4
+
5
+ 1. **Discover packages and their spec layers**:
6
+ ```bash
7
+ python3 ./.trellis/scripts/get_context.py --mode packages
8
+ ```
9
+
10
+ 2. **Identify which specs apply** to your task based on:
11
+ - Which package you're modifying (e.g., `cli/`, `docs-site/`)
12
+ - What type of work (backend, frontend, unit-test, docs, etc.)
13
+
14
+ 3. **Read the spec index** for each relevant module:
15
+ ```bash
16
+ cat .trellis/spec/<package>/<layer>/index.md
17
+ ```
18
+ Follow the **"Pre-Development Checklist"** section in the index.
19
+
20
+ 4. **Read the specific guideline files** listed in the Pre-Development Checklist that are relevant to your task. The index is NOT the goal — it points you to the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`). Read those files to understand the coding standards and patterns.
21
+
22
+ 5. **Always read shared guides**:
23
+ ```bash
24
+ cat .trellis/spec/guides/index.md
25
+ ```
26
+
27
+ 6. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
28
+
29
+ This step is **mandatory** before writing any code.
@@ -0,0 +1,25 @@
1
+ Check if the code you just wrote follows the development guidelines.
2
+
3
+ Execute these steps:
4
+
5
+ 1. **Identify changed files**:
6
+ ```bash
7
+ git diff --name-only HEAD
8
+ ```
9
+
10
+ 2. **Determine which spec modules apply** based on the changed file paths:
11
+ ```bash
12
+ python3 ./.trellis/scripts/get_context.py --mode packages
13
+ ```
14
+
15
+ 3. **Read the spec index** for each relevant module:
16
+ ```bash
17
+ cat .trellis/spec/<package>/<layer>/index.md
18
+ ```
19
+ Follow the **"Quality Check"** section in the index.
20
+
21
+ 4. **Read the specific guideline files** referenced in the Quality Check section (e.g., `quality-guidelines.md`, `conventions.md`). The index is NOT the goal — it points you to the actual guideline files. Read those files and review your code against them.
22
+
23
+ 5. **Run lint and typecheck** for the affected package.
24
+
25
+ 6. **Report any violations** and fix them if found.
@@ -99,8 +99,8 @@ Description:
99
99
  | Command Type | Prefix | Example |
100
100
  |--------------|--------|---------|
101
101
  | Session Start | `start` | `start` |
102
- | Pre-development | `before-` | `before-frontend-dev` |
103
- | Check | `check-` | `check-frontend` |
102
+ | Pre-development | `before-` | `before-dev` |
103
+ | Check | `check-` | `check` |
104
104
  | Record | `record-` | `record-session` |
105
105
  | Generate | `generate-` | `generate-api-doc` |
106
106
  | Update | `update-` | `update-changelog` |
@@ -126,13 +126,13 @@ AI needs the same onboarding - but compressed into seconds at session start.
126
126
 
127
127
  ---
128
128
 
129
- ### /trellis:before-frontend-dev and /trellis:before-backend-dev - Inject Specialized Knowledge
129
+ ### /trellis:before-dev - Inject Specialized Knowledge
130
130
 
131
131
  **WHY IT EXISTS**:
132
132
  AI models have "pre-trained knowledge" - general patterns from millions of codebases. But YOUR project has specific conventions that differ from generic patterns.
133
133
 
134
134
  **WHAT IT ACTUALLY DOES**:
135
- 1. Reads `.trellis/spec/frontend/` or `.trellis/spec/backend/`
135
+ 1. Discovers spec layers via `get_context.py --mode packages` and reads relevant guidelines
136
136
  2. Loads project-specific patterns into AI's working context:
137
137
  - Component naming conventions
138
138
  - State management patterns
@@ -140,12 +140,12 @@ AI models have "pre-trained knowledge" - general patterns from millions of codeb
140
140
  - Error handling standards
141
141
 
142
142
  **WHY THIS MATTERS**:
143
- - Without before-*-dev: AI writes generic code that doesn't match project style.
144
- - With before-*-dev: AI writes code that looks like the rest of the codebase.
143
+ - Without before-dev: AI writes generic code that doesn't match project style.
144
+ - With before-dev: AI writes code that looks like the rest of the codebase.
145
145
 
146
146
  ---
147
147
 
148
- ### /trellis:check-frontend and /trellis:check-backend - Combat Context Drift
148
+ ### /trellis:check - Combat Context Drift
149
149
 
150
150
  **WHY IT EXISTS**:
151
151
  AI context window has limited capacity. As conversation progresses, guidelines injected at session start become less influential. This causes "context drift."
@@ -211,9 +211,9 @@ All the context AI built during this session will be lost when session ends. The
211
211
 
212
212
  **[1/8] /trellis:start** - AI needs project context before touching code
213
213
  **[2/8] python3 ./.trellis/scripts/task.py create "Fix bug" --slug fix-bug** - Track work for future reference
214
- **[3/8] /trellis:before-frontend-dev** - Inject project-specific frontend knowledge
214
+ **[3/8] /trellis:before-dev** - Inject project-specific development guidelines
215
215
  **[4/8] Investigate and fix the bug** - Actual development work
216
- **[5/8] /trellis:check-frontend** - Re-verify code against guidelines
216
+ **[5/8] /trellis:check** - Re-verify code against guidelines
217
217
  **[6/8] /trellis:finish-work** - Holistic cross-layer review
218
218
  **[7/8] Human tests and commits** - Human validates before code enters repo
219
219
  **[8/8] /trellis:record-session** - Persist memory for future sessions
@@ -228,9 +228,9 @@ All the context AI built during this session will be lost when session ends. The
228
228
  ### Example 3: Code Review Fixes
229
229
 
230
230
  **[1/6] /trellis:start** - Resume context from previous session
231
- **[2/6] /trellis:before-backend-dev** - Re-inject guidelines before fixes
231
+ **[2/6] /trellis:before-dev** - Re-inject guidelines before fixes
232
232
  **[3/6] Fix each CR issue** - Address feedback with guidelines in context
233
- **[4/6] /trellis:check-backend** - Verify fixes didn't introduce new issues
233
+ **[4/6] /trellis:check** - Verify fixes did not introduce new issues
234
234
  **[5/6] /trellis:finish-work** - Document lessons from CR
235
235
  **[6/6] Human commits, then /trellis:record-session** - Preserve CR lessons
236
236
 
@@ -238,16 +238,16 @@ All the context AI built during this session will be lost when session ends. The
238
238
 
239
239
  **[1/5] /trellis:start** - Clear baseline before major changes
240
240
  **[2/5] Plan phases** - Break into verifiable chunks
241
- **[3/5] Execute phase by phase with /check-* after each** - Incremental verification
241
+ **[3/5] Execute phase by phase with /trellis:check after each** - Incremental verification
242
242
  **[4/5] /trellis:finish-work** - Check if new patterns should be documented
243
243
  **[5/5] Record with multiple commit hashes** - Link all commits to one feature
244
244
 
245
245
  ### Example 5: Debug Session
246
246
 
247
247
  **[1/6] /trellis:start** - See if this bug was investigated before
248
- **[2/6] /trellis:before-backend-dev** - Guidelines might document known gotchas
248
+ **[2/6] /trellis:before-dev** - Guidelines might document known gotchas
249
249
  **[3/6] Investigation** - Actual debugging work
250
- **[4/6] /trellis:check-backend** - Verify debug changes don't break other things
250
+ **[4/6] /trellis:check** - Verify debug changes do not break other things
251
251
  **[5/6] /trellis:finish-work** - Debug findings might need documentation
252
252
  **[6/6] Human commits, then /trellis:record-session** - Debug knowledge is valuable
253
253
 
@@ -256,7 +256,7 @@ All the context AI built during this session will be lost when session ends. The
256
256
  ## KEY RULES TO EMPHASIZE
257
257
 
258
258
  1. **AI NEVER commits** - Human tests and approves. AI prepares, human validates.
259
- 2. **Guidelines before code** - /before-*-dev commands inject project knowledge.
259
+ 2. **Guidelines before code** - /before-dev command injects project knowledge.
260
260
  3. **Check after code** - /check-* commands catch context drift.
261
261
  4. **Record everything** - /trellis:record-session persists memory.
262
262
 
@@ -41,8 +41,7 @@ python3 ./.trellis/scripts/get_context.py
41
41
  ### Step 3: Read Project Guidelines `[AI]`
42
42
 
43
43
  ```bash
44
- cat .trellis/spec/frontend/index.md # Frontend guidelines index
45
- cat .trellis/spec/backend/index.md # Backend guidelines index
44
+ python3 ./.trellis/scripts/get_context.py --mode packages # Discover available spec layers
46
45
  cat .trellis/spec/guides/index.md # Thinking guides
47
46
  ```
48
47
 
@@ -31,7 +31,7 @@ python3 ./.trellis/scripts/add_session.py \
31
31
  --summary "Brief summary of what was done"
32
32
 
33
33
  # Method 2: Pass detailed content via stdin
34
- cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
34
+ cat << 'EOF' | python3 ./.trellis/scripts/add_session.py --stdin --title "Title" --commit "hash"
35
35
  | Feature | Description |
36
36
  |---------|-------------|
37
37
  | New API | Added user authentication endpoint |
@@ -46,6 +46,7 @@ EOF
46
46
  **Auto-completes**:
47
47
  - [OK] Appends session to journal-N.md
48
48
  - [OK] Auto-detects line count, creates new file if >2000 lines
49
+ - [OK] Auto-detects Branch context (`--branch` override; otherwise Branch = task.json -> current git branch; missing values are omitted gracefully)
49
50
  - [OK] Updates index.md (Total Sessions +1, Last Active, line stats, history)
50
51
  - [OK] Auto-commits .trellis/workspace and .trellis/tasks changes
51
52
 
@@ -56,6 +57,6 @@ EOF
56
57
  | Command | Purpose |
57
58
  |---------|---------|
58
59
  | `python3 ./.trellis/scripts/get_context.py --mode record` | Get context for record-session |
59
- | `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended)** |
60
+ | `python3 ./.trellis/scripts/add_session.py --title "..." --commit "..."` | **One-click add session (recommended, branch auto-complete)** |
60
61
  | `python3 ./.trellis/scripts/task.py archive <name>` | Archive completed task (auto-commits) |
61
62
  | `python3 ./.trellis/scripts/task.py list` | List active tasks |
@@ -40,9 +40,14 @@ This shows: developer identity, git status, current task (if any), active tasks.
40
40
  ### Step 3: Read Guidelines Index
41
41
 
42
42
  ```bash
43
- cat .trellis/spec/frontend/index.md # Frontend guidelines
44
- cat .trellis/spec/backend/index.md # Backend guidelines
45
- cat .trellis/spec/guides/index.md # Thinking guides
43
+ python3 ./.trellis/scripts/get_context.py --mode packages
44
+ ```
45
+
46
+ This shows available packages and their spec layers. Read the relevant spec indexes:
47
+
48
+ ```bash
49
+ cat .trellis/spec/<package>/<layer>/index.md # Package-specific guidelines
50
+ cat .trellis/spec/guides/index.md # Thinking guides (always read)
46
51
  ```
47
52
 
48
53
  > **Important**: The index files are navigation — they list the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`).
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: before-dev
3
+ description: "Discovers and injects project-specific coding guidelines from .trellis/spec/ before implementation begins. Reads spec indexes, pre-development checklists, and shared thinking guides for the target package. Use when starting a new coding task, before writing any code, switching to a different package, or needing to refresh project conventions and standards."
4
+ ---
5
+
6
+ Read the relevant development guidelines before starting your task.
7
+
8
+ Execute these steps:
9
+
10
+ 1. **Discover packages and their spec layers**:
11
+ ```bash
12
+ python3 ./.trellis/scripts/get_context.py --mode packages
13
+ ```
14
+
15
+ 2. **Identify which specs apply** to your task based on:
16
+ - Which package you're modifying (e.g., `cli/`, `docs-site/`)
17
+ - What type of work (backend, frontend, unit-test, docs, etc.)
18
+
19
+ 3. **Read the spec index** for each relevant module:
20
+ ```bash
21
+ cat .trellis/spec/<package>/<layer>/index.md
22
+ ```
23
+ Follow the **"Pre-Development Checklist"** section in the index.
24
+
25
+ 4. **Read the specific guideline files** listed in the Pre-Development Checklist that are relevant to your task. The index is NOT the goal — it points you to the actual guideline files (e.g., `error-handling.md`, `conventions.md`, `mock-strategies.md`). Read those files to understand the coding standards and patterns.
26
+
27
+ 5. **Always read shared guides**:
28
+ ```bash
29
+ cat .trellis/spec/guides/index.md
30
+ ```
31
+
32
+ 6. Understand the coding standards and patterns you need to follow, then proceed with your development plan.
33
+
34
+ This step is **mandatory** before writing any code.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: brainstorm
3
- description: "Brainstorm - Requirements Discovery (AI Coding Enhanced)"
3
+ description: "Collaborative requirements discovery session optimized for AI coding workflows. Creates task directories, seeds PRDs, runs codebase research, proposes concrete implementation approaches with trade-offs, and converges on MVP scope through structured Q&A. Use when requirements are unclear, multiple implementation paths exist, trade-offs need evaluation, or a complex feature needs scoping before development."
4
4
  ---
5
5
 
6
6
  # Brainstorm - Requirements Discovery (AI Coding Enhanced)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: break-loop
3
- description: "Break the Loop - Deep Bug Analysis"
3
+ description: "Deep post-fix bug analysis across five dimensions: root cause categorization, fix failure analysis, prevention mechanisms, systematic expansion, and knowledge capture. Updates .trellis/spec/ guides with lessons learned to prevent recurring bugs. Use when a debugging session completes, after fixing a tricky bug, when the same class of bug keeps recurring, or when you want to capture debugging insights into project documentation."
4
4
  ---
5
5
 
6
6
  # Break the Loop - Deep Bug Analysis
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: check
3
+ description: "Validates recently written code against project-specific development guidelines from .trellis/spec/. Identifies changed files via git diff, discovers applicable spec modules, runs lint and typecheck, and reports guideline violations. Use when code is written and needs quality verification, to catch context drift during long sessions, or before committing changes."
4
+ ---
5
+
6
+ Check if the code you just wrote follows the development guidelines.
7
+
8
+ Execute these steps:
9
+
10
+ 1. **Identify changed files**:
11
+ ```bash
12
+ git diff --name-only HEAD
13
+ ```
14
+
15
+ 2. **Determine which spec modules apply** based on the changed file paths:
16
+ ```bash
17
+ python3 ./.trellis/scripts/get_context.py --mode packages
18
+ ```
19
+
20
+ 3. **Read the spec index** for each relevant module:
21
+ ```bash
22
+ cat .trellis/spec/<package>/<layer>/index.md
23
+ ```
24
+ Follow the **"Quality Check"** section in the index.
25
+
26
+ 4. **Read the specific guideline files** referenced in the Quality Check section (e.g., `quality-guidelines.md`, `conventions.md`). The index is NOT the goal — it points you to the actual guideline files. Read those files and review your code against them.
27
+
28
+ 5. **Run lint and typecheck** for the affected package.
29
+
30
+ 6. **Report any violations** and fix them if found.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: check-cross-layer
3
- description: "Cross-Layer Check"
3
+ description: "Post-implementation verification across multiple code dimensions: cross-layer data flow, code reuse analysis, import path validation, and same-layer consistency checks. Identifies missed update sites, type mismatches, and duplicated constants. Use when changes span 3+ architectural layers, after modifying shared constants or configs, after batch file modifications, or when creating new utility functions."
4
4
  ---
5
5
 
6
6
  # Cross-Layer Check
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: create-command
3
- description: "Create New Skill"
3
+ description: "Scaffolds a new skill file with proper naming conventions and structure. Analyzes requirements to determine skill type and generates appropriate content. Use when adding a new developer workflow skill, creating a custom skill, or extending the Trellis skill set."
4
4
  ---
5
5
 
6
6
  # Create New Skill
@@ -93,8 +93,8 @@ Description:
93
93
  | Skill Type | Prefix | Example |
94
94
  |------------|--------|---------|
95
95
  | Session Start | `start` | `start` |
96
- | Pre-development | `before-` | `before-frontend-dev` |
97
- | Check | `check-` | `check-frontend` |
96
+ | Pre-development | `before-` | `before-dev` |
97
+ | Check | `check-` | `check` |
98
98
  | Record | `record-` | `record-session` |
99
99
  | Generate | `generate-` | `generate-api-doc` |
100
100
  | Update | `update-` | `update-changelog` |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: finish-work
3
- description: "Finish Work - Pre-Commit Checklist"
3
+ description: "Pre-commit quality checklist covering lint, typecheck, tests, code-spec sync, API changes, database migrations, cross-layer verification, and manual testing. Blocks commit if infra or cross-layer specs lack executable depth. Use when code is written and tested but not yet committed, before submitting changes, or as a final review before git commit."
4
4
  ---
5
5
 
6
6
  # Finish Work - Pre-Commit Checklist
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: integrate-skill
3
- description: "Integrate Skill into Project Guidelines"
3
+ description: "Adapts an external skill into project-specific development guidelines in .trellis/spec/. Creates guideline sections, code example templates with .template suffix, and updates spec indexes. Use when integrating an external skill, adding a new skill's patterns to project conventions, or incorporating third-party skill best practices into .trellis/spec/ documentation."
4
4
  ---
5
5
 
6
6
  # Integrate Skill into Project Guidelines