@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
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  <p align="center">
10
10
  <strong>A multi-platform AI coding framework that rules</strong><br/>
11
- <sub>Supports Claude Code, Cursor, OpenCode, iFlow, Codex, Kilo, Kiro, Gemini CLI, Antigravity, and Qoder.</sub>
11
+ <sub>Supports Claude Code, Cursor, OpenCode, iFlow, Codex, Kilo, Kiro, Gemini CLI, Antigravity, Windsurf, Qoder, CodeBuddy, and GitHub Copilot.</sub>
12
12
  </p>
13
13
 
14
14
  <p align="center">
@@ -21,10 +21,19 @@
21
21
 
22
22
  <p align="center">
23
23
  <a href="https://www.npmjs.com/package/@mindfoldhq/trellis"><img src="https://img.shields.io/npm/v/@mindfoldhq/trellis.svg?style=flat-square&color=2563eb" alt="npm version" /></a>
24
+ <a href="https://www.npmjs.com/package/@mindfoldhq/trellis"><img src="https://img.shields.io/npm/dw/@mindfoldhq/trellis?style=flat-square&color=cb3837&label=downloads" alt="npm downloads" /></a>
24
25
  <a href="https://github.com/mindfold-ai/Trellis/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-16a34a.svg?style=flat-square" alt="license" /></a>
25
26
  <a href="https://github.com/mindfold-ai/Trellis/stargazers"><img src="https://img.shields.io/github/stars/mindfold-ai/Trellis?style=flat-square&color=eab308" alt="stars" /></a>
26
27
  <a href="https://docs.trytrellis.app/"><img src="https://img.shields.io/badge/docs-trytrellis.app-0f766e?style=flat-square" alt="docs" /></a>
27
28
  <a href="https://discord.com/invite/tWcCZ3aRHc"><img src="https://img.shields.io/badge/Discord-Join-5865F2?style=flat-square&logo=discord&logoColor=white" alt="Discord" /></a>
29
+ <a href="https://github.com/mindfold-ai/Trellis/issues"><img src="https://img.shields.io/github/issues/mindfold-ai/Trellis?style=flat-square&color=e67e22" alt="open issues" /></a>
30
+ <a href="https://github.com/mindfold-ai/Trellis/pulls"><img src="https://img.shields.io/github/issues-pr/mindfold-ai/Trellis?style=flat-square&color=9b59b6" alt="open PRs" /></a>
31
+ <a href="https://deepwiki.com/mindfold-ai/Trellis"><img src="https://img.shields.io/badge/Ask-DeepWiki-blue?style=flat-square" alt="Ask DeepWiki" /></a>
32
+ <a href="https://chatgpt.com/?q=Explain+the+project+mindfold-ai/Trellis+on+GitHub"><img src="https://img.shields.io/badge/Ask-ChatGPT-74aa9c?style=flat-square&logo=openai&logoColor=white" alt="Ask ChatGPT" /></a>
33
+ </p>
34
+
35
+ <p align="center">
36
+ <img src="assets/trellis-demo.gif" alt="Trellis workflow demo" width="100%">
28
37
  </p>
29
38
 
30
39
  ## Why Trellis?
@@ -36,7 +45,12 @@
36
45
  | **Parallel agent execution** | Run multiple AI tasks side by side with git worktrees instead of turning one branch into a traffic jam. |
37
46
  | **Project memory** | Journals in `.trellis/workspace/` preserve what happened last time, so each new session starts with real context. |
38
47
  | **Team-shared standards** | Specs live in the repo, so one person’s hard-won workflow or rule can benefit the whole team. |
39
- | **Multi-platform setup** | Bring the same Trellis structure to 10 AI coding platforms instead of rebuilding your workflow per tool. |
48
+ | **Multi-platform setup** | Bring the same Trellis structure to 13 AI coding platforms instead of rebuilding your workflow per tool. |
49
+
50
+ ## Prerequisites
51
+
52
+ - **Node.js** ≥ 18
53
+ - **Python** ≥ 3.10 (required for hooks and automation scripts)
40
54
 
41
55
  ## Quick Start
42
56
 
@@ -52,7 +66,7 @@ trellis init --cursor --opencode --codex -u your-name
52
66
  ```
53
67
 
54
68
  - `-u your-name` creates `.trellis/workspace/your-name/` for personal journals and session continuity.
55
- - Platform flags can be mixed and matched. Current options include `--cursor`, `--opencode`, `--iflow`, `--codex`, `--kilo`, `--kiro`, `--gemini`, `--antigravity`, and `--qoder`.
69
+ - Platform flags can be mixed and matched. Current options include `--cursor`, `--opencode`, `--iflow`, `--codex`, `--kilo`, `--kiro`, `--gemini`, `--antigravity`, `--windsurf`, `--qoder`, `--codebuddy`, and `--copilot`.
56
70
  - For platform-specific setup, entry commands, and upgrade paths, use the docs:
57
71
  [Quick Start](https://docs.trytrellis.app/guide/ch02-quick-start) •
58
72
  [Supported Platforms](https://docs.trytrellis.app/guide/ch13-multi-platform) •
@@ -89,7 +103,7 @@ Trellis keeps the core workflow in `.trellis/` and generates the platform-specif
89
103
  └── scripts/ # Utilities that power the workflow
90
104
  ```
91
105
 
92
- Depending on the platforms you enable, Trellis also creates tool-specific integration files such as `.claude/`, `.cursor/`, `AGENTS.md`, `.agents/`, `.kilocode/`, and `.kiro/`.
106
+ Depending on the platforms you enable, Trellis also creates tool-specific integration files such as `.claude/`, `.cursor/`, `AGENTS.md`, `.agents/`, `.codex/`, `.kilocode/`, `.kiro/`, `.github/copilot/`, and `.github/hooks/`. For Codex, Trellis now installs both project skills under `.agents/skills/` and project-scoped config/custom agents under `.codex/`.
93
107
 
94
108
  At a high level, the workflow is simple:
95
109
 
@@ -129,7 +143,7 @@ Those files are useful, but they tend to become monolithic. Trellis adds structu
129
143
  <details>
130
144
  <summary><strong>Is Trellis only for Claude Code?</strong></summary>
131
145
 
132
- No. Trellis currently supports Claude Code, Cursor, OpenCode, iFlow, Codex, Kilo, Kiro, Gemini CLI, and Antigravity. The detailed setup and entry command for each tool lives in the supported platforms guide.
146
+ No. Trellis currently supports Claude Code, Cursor, OpenCode, iFlow, Codex, Kilo, Kiro, Gemini CLI, Antigravity, Windsurf, Qoder, CodeBuddy, and GitHub Copilot. The detailed setup and entry command for each tool lives in the supported platforms guide.
133
147
 
134
148
  </details>
135
149
 
package/dist/cli/index.js CHANGED
@@ -52,11 +52,16 @@ program
52
52
  .option("--kiro", "Include Kiro Code skills")
53
53
  .option("--gemini", "Include Gemini CLI commands")
54
54
  .option("--antigravity", "Include Antigravity workflows")
55
+ .option("--windsurf", "Include Windsurf workflows")
55
56
  .option("--qoder", "Include Qoder commands")
57
+ .option("--codebuddy", "Include CodeBuddy commands")
58
+ .option("--copilot", "Include GitHub Copilot hooks")
56
59
  .option("-y, --yes", "Skip prompts and use defaults")
57
60
  .option("-u, --user <name>", "Initialize developer identity with specified name")
58
61
  .option("-f, --force", "Overwrite existing files without asking")
59
62
  .option("-s, --skip-existing", "Skip existing files without asking")
63
+ .option("--monorepo", "Force monorepo mode")
64
+ .option("--no-monorepo", "Skip monorepo detection")
60
65
  .option("-t, --template <name>", "Use a remote spec template (e.g., electron-fullstack)")
61
66
  .option("--overwrite", "Overwrite existing spec directory when using template")
62
67
  .option("--append", "Only add missing files when using template")
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA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M,CAAC,mBAAmB,EAAE,uCAAuC,CAAC;KACpE,MAAM,CAAC,WAAW,EAAE,mDAAmD,CAAC;KACxE,MAAM,CAAC,KAAK,EAAE,OAAgC,EAAE,EAAE;IACjD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC;YACX,MAAM,EAAE,OAAO,CAAC,MAAiB;YACjC,KAAK,EAAE,OAAO,CAAC,KAAgB;YAC/B,OAAO,EAAE,OAAO,CAAC,OAAkB;YACnC,SAAS,EAAE,OAAO,CAAC,SAAoB;YACvC,cAAc,EAAE,OAAO,CAAC,cAAyB;YACjD,OAAO,EAAE,OAAO,CAAC,OAAkB;SACpC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EACnB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAC/C,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -8,7 +8,10 @@ interface InitOptions {
8
8
  kiro?: boolean;
9
9
  gemini?: boolean;
10
10
  antigravity?: boolean;
11
+ windsurf?: boolean;
11
12
  qoder?: boolean;
13
+ codebuddy?: boolean;
14
+ copilot?: boolean;
12
15
  yes?: boolean;
13
16
  user?: string;
14
17
  force?: boolean;
@@ -17,6 +20,7 @@ interface InitOptions {
17
20
  overwrite?: boolean;
18
21
  append?: boolean;
19
22
  registry?: string;
23
+ monorepo?: boolean;
20
24
  }
21
25
  export declare function init(options: InitOptions): Promise<void>;
22
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AA+TA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACj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AO,CAAC,EAAE,OAAO,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AA2DD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAmtB9D"}
@@ -12,36 +12,60 @@ import { DIR_NAMES, FILE_NAMES, PATHS } from "../constants/paths.js";
12
12
  import { VERSION } from "../constants/version.js";
13
13
  import { agentsMdContent } from "../templates/markdown/index.js";
14
14
  import { setWriteMode, writeFile, } from "../utils/file-writer.js";
15
- import { detectProjectType, } from "../utils/project-detector.js";
15
+ import { detectProjectType, detectMonorepo, sanitizePkgName, } from "../utils/project-detector.js";
16
16
  import { initializeHashes } from "../utils/template-hash.js";
17
17
  import { fetchTemplateIndex, probeRegistryIndex, downloadTemplateById, downloadRegistryDirect, parseRegistrySource, TIMEOUTS, TEMPLATE_INDEX_URL, } from "../utils/template-fetcher.js";
18
18
  import { setupProxy, maskProxyUrl } from "../utils/proxy.js";
19
19
  /**
20
- * Detect available Python command (python3 or python)
20
+ * Detect available Python command (python3 or python) and verify version >= 3.10
21
21
  */
22
22
  function getPythonCommand() {
23
- // Try python3 first (preferred on macOS/Linux)
24
- try {
25
- execSync("python3 --version", { stdio: "pipe" });
23
+ const MIN_MAJOR = 3;
24
+ const MIN_MINOR = 10;
25
+ function checkVersion(cmd) {
26
+ try {
27
+ const output = execSync(`${cmd} --version`, { stdio: "pipe" })
28
+ .toString()
29
+ .trim();
30
+ const match = output.match(/Python (\d+)\.(\d+)/);
31
+ if (!match)
32
+ return false;
33
+ const [, major, minor] = match.map(Number);
34
+ return major > MIN_MAJOR || (major === MIN_MAJOR && minor >= MIN_MINOR);
35
+ }
36
+ catch {
37
+ return false;
38
+ }
39
+ }
40
+ if (checkVersion("python3"))
26
41
  return "python3";
42
+ if (checkVersion("python"))
43
+ return "python";
44
+ // Check if Python exists but is too old
45
+ try {
46
+ const output = execSync("python3 --version", { stdio: "pipe" })
47
+ .toString()
48
+ .trim();
49
+ console.warn(chalk.yellow(`⚠️ ${output} detected, but Trellis requires Python ≥ 3.10`));
27
50
  }
28
51
  catch {
29
- // Fall back to python (common on Windows)
30
52
  try {
31
- execSync("python --version", { stdio: "pipe" });
32
- return "python";
53
+ const output = execSync("python --version", { stdio: "pipe" })
54
+ .toString()
55
+ .trim();
56
+ console.warn(chalk.yellow(`⚠️ ${output} detected, but Trellis requires Python ≥ 3.10`));
33
57
  }
34
58
  catch {
35
- // Default to python3, let it fail with a clear error
36
- return "python3";
59
+ // No Python at all
37
60
  }
38
61
  }
62
+ return "python3";
39
63
  }
40
64
  // =============================================================================
41
65
  // Bootstrap Task Creation
42
66
  // =============================================================================
43
67
  const BOOTSTRAP_TASK_NAME = "00-bootstrap-guidelines";
44
- function getBootstrapPrdContent(projectType) {
68
+ function getBootstrapPrdContent(projectType, packages) {
45
69
  const header = `# Bootstrap: Fill Project Development Guidelines
46
70
 
47
71
  ## Purpose
@@ -49,7 +73,7 @@ function getBootstrapPrdContent(projectType) {
49
73
  Welcome to Trellis! This is your first task.
50
74
 
51
75
  AI agents use \`.trellis/spec/\` to understand YOUR project's coding conventions.
52
- **Empty templates = AI writes generic code that doesn't match your project style.**
76
+ **Starting from scratch = AI writes generic code that doesn't match your project style.**
53
77
 
54
78
  Filling these guidelines is a one-time setup that pays off for every future AI session.
55
79
 
@@ -102,7 +126,7 @@ Many projects already have coding conventions documented. **Check these first**
102
126
  | File / Directory | Tool |
103
127
  |------|------|
104
128
  | \`CLAUDE.md\` / \`CLAUDE.local.md\` | Claude Code |
105
- | \`AGENTS.md\` | Claude Code |
129
+ | \`AGENTS.md\` | Codex / Claude Code / agent-compatible tools |
106
130
  | \`.cursorrules\` | Cursor |
107
131
  | \`.cursor/rules/*.mdc\` | Cursor (rules directory) |
108
132
  | \`.windsurfrules\` | Windsurf |
@@ -160,7 +184,21 @@ After completing this task:
160
184
  4. Future developers (human or AI) will onboard faster
161
185
  `;
162
186
  let content = header;
163
- if (projectType === "frontend") {
187
+ if (packages && packages.length > 0) {
188
+ // Monorepo: generate per-package sections
189
+ for (const pkg of packages) {
190
+ const pkgType = pkg.type === "unknown" ? "fullstack" : pkg.type;
191
+ const specName = sanitizePkgName(pkg.name);
192
+ content += `\n### Package: ${pkg.name} (\`spec/${specName}/\`)\n`;
193
+ if (pkgType !== "frontend") {
194
+ content += `\n- Backend guidelines: \`.trellis/spec/${specName}/backend/\`\n`;
195
+ }
196
+ if (pkgType !== "backend") {
197
+ content += `\n- Frontend guidelines: \`.trellis/spec/${specName}/frontend/\`\n`;
198
+ }
199
+ }
200
+ }
201
+ else if (projectType === "frontend") {
164
202
  content += frontendSection;
165
203
  }
166
204
  else if (projectType === "backend") {
@@ -174,11 +212,20 @@ After completing this task:
174
212
  content += footer;
175
213
  return content;
176
214
  }
177
- function getBootstrapTaskJson(developer, projectType) {
215
+ function getBootstrapTaskJson(developer, projectType, packages) {
178
216
  const today = new Date().toISOString().split("T")[0];
179
217
  let subtasks;
180
218
  let relatedFiles;
181
- if (projectType === "frontend") {
219
+ if (packages && packages.length > 0) {
220
+ // Monorepo: subtask per package
221
+ subtasks = packages.map((pkg) => ({
222
+ name: `Fill guidelines for ${pkg.name}`,
223
+ status: "pending",
224
+ }));
225
+ subtasks.push({ name: "Add code examples", status: "pending" });
226
+ relatedFiles = packages.map((pkg) => `.trellis/spec/${sanitizePkgName(pkg.name)}/`);
227
+ }
228
+ else if (projectType === "frontend") {
182
229
  subtasks = [
183
230
  { name: "Fill frontend guidelines", status: "pending" },
184
231
  { name: "Add code examples", status: "pending" },
@@ -224,7 +271,7 @@ function getBootstrapTaskJson(developer, projectType) {
224
271
  /**
225
272
  * Create bootstrap task for first-time setup
226
273
  */
227
- function createBootstrapTask(cwd, developer, projectType) {
274
+ function createBootstrapTask(cwd, developer, projectType, packages) {
228
275
  const taskDir = path.join(cwd, PATHS.TASKS, BOOTSTRAP_TASK_NAME);
229
276
  const taskRelativePath = `${PATHS.TASKS}/${BOOTSTRAP_TASK_NAME}`;
230
277
  // Check if already exists
@@ -235,10 +282,10 @@ function createBootstrapTask(cwd, developer, projectType) {
235
282
  // Create task directory
236
283
  fs.mkdirSync(taskDir, { recursive: true });
237
284
  // Write task.json
238
- const taskJson = getBootstrapTaskJson(developer, projectType);
285
+ const taskJson = getBootstrapTaskJson(developer, projectType, packages);
239
286
  fs.writeFileSync(path.join(taskDir, FILE_NAMES.TASK_JSON), JSON.stringify(taskJson, null, 2), "utf-8");
240
287
  // Write prd.md
241
- const prdContent = getBootstrapPrdContent(projectType);
288
+ const prdContent = getBootstrapPrdContent(projectType, packages);
242
289
  fs.writeFileSync(path.join(taskDir, FILE_NAMES.PRD), prdContent, "utf-8");
243
290
  // Set as current task
244
291
  const currentTaskFile = path.join(cwd, PATHS.CURRENT_TASK_FILE);
@@ -250,6 +297,39 @@ function createBootstrapTask(cwd, developer, projectType) {
250
297
  }
251
298
  }
252
299
  const _cliFlagCheck = true;
300
+ /**
301
+ * Write monorepo package configuration to config.yaml (non-destructive patch).
302
+ * Appends packages: and default_package: without disturbing existing config.
303
+ */
304
+ function writeMonorepoConfig(cwd, packages) {
305
+ const configPath = path.join(cwd, DIR_NAMES.WORKFLOW, "config.yaml");
306
+ let content = "";
307
+ try {
308
+ content = fs.readFileSync(configPath, "utf-8");
309
+ }
310
+ catch {
311
+ // Config not created yet; will be created by createWorkflowStructure
312
+ return;
313
+ }
314
+ // Don't overwrite if packages: already exists (re-init case)
315
+ if (/^packages\s*:/m.test(content)) {
316
+ return;
317
+ }
318
+ const lines = ["\n# Auto-detected monorepo packages", "packages:"];
319
+ for (const pkg of packages) {
320
+ lines.push(` ${sanitizePkgName(pkg.name)}:`);
321
+ lines.push(` path: ${pkg.path}`);
322
+ if (pkg.isSubmodule) {
323
+ lines.push(" type: submodule");
324
+ }
325
+ }
326
+ // Use first non-submodule package as default, fallback to first package
327
+ const defaultPkg = packages.find((p) => !p.isSubmodule)?.name ?? packages[0]?.name;
328
+ if (defaultPkg) {
329
+ lines.push(`default_package: ${defaultPkg}`);
330
+ }
331
+ fs.writeFileSync(configPath, content.trimEnd() + "\n" + lines.join("\n") + "\n", "utf-8");
332
+ }
253
333
  export async function init(options) {
254
334
  const cwd = process.cwd();
255
335
  // Generate ASCII art banner dynamically using FIGlet "Rebel" font
@@ -306,6 +386,131 @@ export async function init(options) {
306
386
  }
307
387
  // Detect project type (silent - no output)
308
388
  const detectedType = detectProjectType(cwd);
389
+ // Parse custom registry source early (needed by both monorepo + single-repo flows)
390
+ let registry;
391
+ if (options.registry) {
392
+ try {
393
+ registry = parseRegistrySource(options.registry);
394
+ }
395
+ catch (error) {
396
+ console.log(chalk.red(error instanceof Error ? error.message : "Invalid registry source"));
397
+ return;
398
+ }
399
+ }
400
+ // Determine template strategy from flags (needed before monorepo template downloads)
401
+ let templateStrategy = "skip";
402
+ if (options.overwrite) {
403
+ templateStrategy = "overwrite";
404
+ }
405
+ else if (options.append) {
406
+ templateStrategy = "append";
407
+ }
408
+ // ==========================================================================
409
+ // Monorepo Detection
410
+ // ==========================================================================
411
+ let monorepoPackages;
412
+ let remoteSpecPackages;
413
+ if (options.monorepo !== false) {
414
+ // options.monorepo: true = --monorepo, false = --no-monorepo, undefined = auto
415
+ const detected = detectMonorepo(cwd);
416
+ if (options.monorepo === true && !detected) {
417
+ console.log(chalk.red("Error: --monorepo specified but no monorepo configuration found."));
418
+ return;
419
+ }
420
+ if (detected && detected.length > 0) {
421
+ let enableMonorepo = false;
422
+ if (options.monorepo === true || options.yes) {
423
+ enableMonorepo = true;
424
+ }
425
+ else {
426
+ // Show detected packages and ask
427
+ console.log(chalk.blue("\n🔍 Detected monorepo packages:"));
428
+ for (const pkg of detected) {
429
+ const sub = pkg.isSubmodule ? chalk.gray(" (submodule)") : "";
430
+ console.log(chalk.gray(` - ${pkg.name}`) +
431
+ chalk.gray(` (${pkg.path})`) +
432
+ chalk.gray(` [${pkg.type}]`) +
433
+ sub);
434
+ }
435
+ console.log("");
436
+ const { useMonorepo } = await inquirer.prompt([
437
+ {
438
+ type: "confirm",
439
+ name: "useMonorepo",
440
+ message: "Enable monorepo mode?",
441
+ default: true,
442
+ },
443
+ ]);
444
+ enableMonorepo = useMonorepo;
445
+ }
446
+ if (enableMonorepo) {
447
+ monorepoPackages = detected;
448
+ remoteSpecPackages = new Set();
449
+ // Per-package template selection (unless -y mode: all use blank spec)
450
+ if (!options.yes && !options.template) {
451
+ for (const pkg of detected) {
452
+ const { specSource } = await inquirer.prompt([
453
+ {
454
+ type: "list",
455
+ name: "specSource",
456
+ message: `Spec source for ${pkg.name} (${pkg.path}):`,
457
+ choices: [
458
+ { name: "From scratch (Trellis default)", value: "blank" },
459
+ { name: "Download remote template", value: "remote" },
460
+ ],
461
+ default: "blank",
462
+ },
463
+ ]);
464
+ if (specSource === "remote") {
465
+ // Use existing template download flow, targeting spec/<name>/
466
+ const destDir = path.join(cwd, PATHS.SPEC, sanitizePkgName(pkg.name));
467
+ console.log(chalk.blue(`📦 Select template for ${pkg.name}...`));
468
+ // Fetch templates if not already done
469
+ const templates = await fetchTemplateIndex();
470
+ const specTemplates = templates
471
+ .filter((t) => t.type === "spec")
472
+ .map((t) => ({
473
+ name: `${t.id} (${t.name})`,
474
+ value: t.id,
475
+ }));
476
+ if (specTemplates.length > 0) {
477
+ const { templateId } = await inquirer.prompt([
478
+ {
479
+ type: "list",
480
+ name: "templateId",
481
+ message: `Select template for ${pkg.name}:`,
482
+ choices: specTemplates,
483
+ },
484
+ ]);
485
+ const result = await downloadTemplateById(cwd, templateId, templateStrategy, templates.find((t) => t.id === templateId), undefined, destDir);
486
+ if (result.success) {
487
+ console.log(chalk.green(` ${result.message}`));
488
+ remoteSpecPackages.add(sanitizePkgName(pkg.name));
489
+ }
490
+ else {
491
+ console.log(chalk.yellow(` ${result.message}`));
492
+ console.log(chalk.gray(" Falling back to blank spec..."));
493
+ }
494
+ }
495
+ else {
496
+ console.log(chalk.gray(" No templates available. Using blank spec."));
497
+ }
498
+ }
499
+ }
500
+ }
501
+ else if (options.template) {
502
+ // --template as default for all packages
503
+ for (const pkg of detected) {
504
+ const destDir = path.join(cwd, PATHS.SPEC, sanitizePkgName(pkg.name));
505
+ const result = await downloadTemplateById(cwd, options.template, templateStrategy, undefined, registry, destDir);
506
+ if (result.success && !result.skipped) {
507
+ remoteSpecPackages.add(sanitizePkgName(pkg.name));
508
+ }
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
309
514
  // Tool definitions derived from platform registry
310
515
  const TOOLS = getInitToolChoices();
311
516
  // Build tools from explicit flags
@@ -342,35 +547,19 @@ export async function init(options) {
342
547
  return;
343
548
  }
344
549
  // ==========================================================================
345
- // Template Selection
550
+ // Template Selection (single-repo only; monorepo handles templates above)
346
551
  // ==========================================================================
347
552
  let selectedTemplate = null;
348
- let templateStrategy = "skip";
349
- // Determine template strategy from flags
350
- if (options.overwrite) {
351
- templateStrategy = "overwrite";
352
- }
353
- else if (options.append) {
354
- templateStrategy = "append";
355
- }
356
- // Parse custom registry source if provided
357
- let registry;
358
- if (options.registry) {
359
- try {
360
- registry = parseRegistrySource(options.registry);
361
- }
362
- catch (error) {
363
- console.log(chalk.red(error instanceof Error ? error.message : "Invalid registry source"));
364
- return;
365
- }
366
- }
367
553
  // Pre-fetched templates list (used to pass selected SpecTemplate to downloadTemplateById)
368
554
  let fetchedTemplates = [];
369
555
  // Determine the index URL based on registry
370
556
  const indexUrl = registry
371
557
  ? `${registry.rawBaseUrl}/index.json`
372
558
  : TEMPLATE_INDEX_URL;
373
- if (options.template) {
559
+ if (monorepoPackages) {
560
+ // Monorepo: template selection already handled above
561
+ }
562
+ else if (options.template) {
374
563
  // Template specified via --template flag
375
564
  selectedTemplate = options.template;
376
565
  }
@@ -424,7 +613,7 @@ export async function init(options) {
424
613
  ? specTemplates
425
614
  : [
426
615
  {
427
- name: "blank (default - empty templates)",
616
+ name: "from scratch (default)",
428
617
  value: "blank",
429
618
  },
430
619
  ...specTemplates,
@@ -557,7 +746,8 @@ export async function init(options) {
557
746
  }
558
747
  }
559
748
  // -y mode with --registry (no --template): probe index.json to detect mode
560
- if (options.yes && registry && !selectedTemplate) {
749
+ // Skip when monorepo mode already handled templates above
750
+ if (options.yes && registry && !selectedTemplate && !monorepoPackages) {
561
751
  const probeResult = await probeRegistryIndex(`${registry.rawBaseUrl}/index.json`);
562
752
  if (probeResult.templates.length > 0) {
563
753
  // Marketplace mode requires interactive selection — can't auto-select
@@ -651,7 +841,14 @@ export async function init(options) {
651
841
  projectType,
652
842
  multiAgent: true,
653
843
  skipSpecTemplates: useRemoteTemplate,
844
+ packages: monorepoPackages,
845
+ remoteSpecPackages,
654
846
  });
847
+ // Write monorepo packages to config.yaml (non-destructive patch)
848
+ if (monorepoPackages) {
849
+ writeMonorepoConfig(cwd, monorepoPackages);
850
+ console.log(chalk.blue("📦 Monorepo packages written to config.yaml"));
851
+ }
655
852
  // Write version file for update tracking
656
853
  const versionPath = path.join(cwd, DIR_NAMES.WORKFLOW, ".version");
657
854
  fs.writeFileSync(versionPath, VERSION);
@@ -688,7 +885,7 @@ export async function init(options) {
688
885
  stdio: "pipe", // Silent
689
886
  });
690
887
  // Create bootstrap task to guide user through filling guidelines
691
- createBootstrapTask(cwd, developerName, projectType);
888
+ createBootstrapTask(cwd, developerName, projectType, monorepoPackages);
692
889
  }
693
890
  catch {
694
891
  // Silent failure - user can run init_developer.py manually