@mindfoldhq/trellis 0.6.0-beta.9 → 0.6.0-rc.0

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 (316) hide show
  1. package/README.md +49 -49
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +36 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/commands/channel/adapters/claude.d.ts +29 -0
  6. package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
  7. package/dist/commands/channel/adapters/claude.js +203 -0
  8. package/dist/commands/channel/adapters/claude.js.map +1 -0
  9. package/dist/commands/channel/adapters/codex.d.ts +85 -0
  10. package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
  11. package/dist/commands/channel/adapters/codex.js +505 -0
  12. package/dist/commands/channel/adapters/codex.js.map +1 -0
  13. package/dist/commands/channel/adapters/index.d.ts +84 -0
  14. package/dist/commands/channel/adapters/index.d.ts.map +1 -0
  15. package/dist/commands/channel/adapters/index.js +115 -0
  16. package/dist/commands/channel/adapters/index.js.map +1 -0
  17. package/dist/commands/channel/adapters/types.d.ts +33 -0
  18. package/dist/commands/channel/adapters/types.d.ts.map +1 -0
  19. package/dist/commands/channel/adapters/types.js +2 -0
  20. package/dist/commands/channel/adapters/types.js.map +1 -0
  21. package/dist/commands/channel/agent-loader.d.ts +32 -0
  22. package/dist/commands/channel/agent-loader.d.ts.map +1 -0
  23. package/dist/commands/channel/agent-loader.js +154 -0
  24. package/dist/commands/channel/agent-loader.js.map +1 -0
  25. package/dist/commands/channel/context-loader.d.ts +26 -0
  26. package/dist/commands/channel/context-loader.d.ts.map +1 -0
  27. package/dist/commands/channel/context-loader.js +290 -0
  28. package/dist/commands/channel/context-loader.js.map +1 -0
  29. package/dist/commands/channel/context.d.ts +16 -0
  30. package/dist/commands/channel/context.d.ts.map +1 -0
  31. package/dist/commands/channel/context.js +83 -0
  32. package/dist/commands/channel/context.js.map +1 -0
  33. package/dist/commands/channel/create.d.ts +27 -0
  34. package/dist/commands/channel/create.d.ts.map +1 -0
  35. package/dist/commands/channel/create.js +39 -0
  36. package/dist/commands/channel/create.js.map +1 -0
  37. package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
  38. package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
  39. package/dist/commands/channel/dev-parse-trace.js +70 -0
  40. package/dist/commands/channel/dev-parse-trace.js.map +1 -0
  41. package/dist/commands/channel/guard.d.ts +150 -0
  42. package/dist/commands/channel/guard.d.ts.map +1 -0
  43. package/dist/commands/channel/guard.js +474 -0
  44. package/dist/commands/channel/guard.js.map +1 -0
  45. package/dist/commands/channel/index.d.ts +3 -0
  46. package/dist/commands/channel/index.d.ts.map +1 -0
  47. package/dist/commands/channel/index.js +531 -0
  48. package/dist/commands/channel/index.js.map +1 -0
  49. package/dist/commands/channel/interrupt.d.ts +10 -0
  50. package/dist/commands/channel/interrupt.d.ts.map +1 -0
  51. package/dist/commands/channel/interrupt.js +22 -0
  52. package/dist/commands/channel/interrupt.js.map +1 -0
  53. package/dist/commands/channel/kill.d.ts +7 -0
  54. package/dist/commands/channel/kill.d.ts.map +1 -0
  55. package/dist/commands/channel/kill.js +121 -0
  56. package/dist/commands/channel/kill.js.map +1 -0
  57. package/dist/commands/channel/list.d.ts +17 -0
  58. package/dist/commands/channel/list.d.ts.map +1 -0
  59. package/dist/commands/channel/list.js +233 -0
  60. package/dist/commands/channel/list.js.map +1 -0
  61. package/dist/commands/channel/messages.d.ts +15 -0
  62. package/dist/commands/channel/messages.d.ts.map +1 -0
  63. package/dist/commands/channel/messages.js +245 -0
  64. package/dist/commands/channel/messages.js.map +1 -0
  65. package/dist/commands/channel/rm.d.ts +27 -0
  66. package/dist/commands/channel/rm.d.ts.map +1 -0
  67. package/dist/commands/channel/rm.js +216 -0
  68. package/dist/commands/channel/rm.js.map +1 -0
  69. package/dist/commands/channel/run.d.ts +30 -0
  70. package/dist/commands/channel/run.d.ts.map +1 -0
  71. package/dist/commands/channel/run.js +130 -0
  72. package/dist/commands/channel/run.js.map +1 -0
  73. package/dist/commands/channel/send.d.ts +11 -0
  74. package/dist/commands/channel/send.d.ts.map +1 -0
  75. package/dist/commands/channel/send.js +24 -0
  76. package/dist/commands/channel/send.js.map +1 -0
  77. package/dist/commands/channel/spawn.d.ts +40 -0
  78. package/dist/commands/channel/spawn.d.ts.map +1 -0
  79. package/dist/commands/channel/spawn.js +244 -0
  80. package/dist/commands/channel/spawn.js.map +1 -0
  81. package/dist/commands/channel/store/events.d.ts +39 -0
  82. package/dist/commands/channel/store/events.d.ts.map +1 -0
  83. package/dist/commands/channel/store/events.js +87 -0
  84. package/dist/commands/channel/store/events.js.map +1 -0
  85. package/dist/commands/channel/store/filter.d.ts +3 -0
  86. package/dist/commands/channel/store/filter.d.ts.map +1 -0
  87. package/dist/commands/channel/store/filter.js +2 -0
  88. package/dist/commands/channel/store/filter.js.map +1 -0
  89. package/dist/commands/channel/store/lock.d.ts +23 -0
  90. package/dist/commands/channel/store/lock.d.ts.map +1 -0
  91. package/dist/commands/channel/store/lock.js +99 -0
  92. package/dist/commands/channel/store/lock.js.map +1 -0
  93. package/dist/commands/channel/store/paths.d.ts +63 -0
  94. package/dist/commands/channel/store/paths.d.ts.map +1 -0
  95. package/dist/commands/channel/store/paths.js +246 -0
  96. package/dist/commands/channel/store/paths.js.map +1 -0
  97. package/dist/commands/channel/store/schema.d.ts +27 -0
  98. package/dist/commands/channel/store/schema.d.ts.map +1 -0
  99. package/dist/commands/channel/store/schema.js +34 -0
  100. package/dist/commands/channel/store/schema.js.map +1 -0
  101. package/dist/commands/channel/store/thread-state.d.ts +5 -0
  102. package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
  103. package/dist/commands/channel/store/thread-state.js +16 -0
  104. package/dist/commands/channel/store/thread-state.js.map +1 -0
  105. package/dist/commands/channel/store/watch.d.ts +19 -0
  106. package/dist/commands/channel/store/watch.d.ts.map +1 -0
  107. package/dist/commands/channel/store/watch.js +146 -0
  108. package/dist/commands/channel/store/watch.js.map +1 -0
  109. package/dist/commands/channel/supervisor/idle.d.ts +46 -0
  110. package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
  111. package/dist/commands/channel/supervisor/idle.js +72 -0
  112. package/dist/commands/channel/supervisor/idle.js.map +1 -0
  113. package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
  114. package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
  115. package/dist/commands/channel/supervisor/inbox.js +160 -0
  116. package/dist/commands/channel/supervisor/inbox.js.map +1 -0
  117. package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
  118. package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
  119. package/dist/commands/channel/supervisor/shutdown.js +146 -0
  120. package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
  121. package/dist/commands/channel/supervisor/stdout.d.ts +51 -0
  122. package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
  123. package/dist/commands/channel/supervisor/stdout.js +121 -0
  124. package/dist/commands/channel/supervisor/stdout.js.map +1 -0
  125. package/dist/commands/channel/supervisor/turns.d.ts +31 -0
  126. package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
  127. package/dist/commands/channel/supervisor/turns.js +45 -0
  128. package/dist/commands/channel/supervisor/turns.js.map +1 -0
  129. package/dist/commands/channel/supervisor/warning.d.ts +48 -0
  130. package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
  131. package/dist/commands/channel/supervisor/warning.js +77 -0
  132. package/dist/commands/channel/supervisor/warning.js.map +1 -0
  133. package/dist/commands/channel/supervisor.d.ts +59 -0
  134. package/dist/commands/channel/supervisor.d.ts.map +1 -0
  135. package/dist/commands/channel/supervisor.js +344 -0
  136. package/dist/commands/channel/supervisor.js.map +1 -0
  137. package/dist/commands/channel/text-body.d.ts +13 -0
  138. package/dist/commands/channel/text-body.d.ts.map +1 -0
  139. package/dist/commands/channel/text-body.js +47 -0
  140. package/dist/commands/channel/text-body.js.map +1 -0
  141. package/dist/commands/channel/threads.d.ts +39 -0
  142. package/dist/commands/channel/threads.d.ts.map +1 -0
  143. package/dist/commands/channel/threads.js +106 -0
  144. package/dist/commands/channel/threads.js.map +1 -0
  145. package/dist/commands/channel/title.d.ts +12 -0
  146. package/dist/commands/channel/title.d.ts.map +1 -0
  147. package/dist/commands/channel/title.js +24 -0
  148. package/dist/commands/channel/title.js.map +1 -0
  149. package/dist/commands/channel/wait.d.ts +17 -0
  150. package/dist/commands/channel/wait.d.ts.map +1 -0
  151. package/dist/commands/channel/wait.js +75 -0
  152. package/dist/commands/channel/wait.js.map +1 -0
  153. package/dist/commands/init.d.ts +3 -0
  154. package/dist/commands/init.d.ts.map +1 -1
  155. package/dist/commands/init.js +162 -43
  156. package/dist/commands/init.js.map +1 -1
  157. package/dist/commands/mem.d.ts +13 -217
  158. package/dist/commands/mem.d.ts.map +1 -1
  159. package/dist/commands/mem.js +142 -1587
  160. package/dist/commands/mem.js.map +1 -1
  161. package/dist/commands/uninstall.d.ts.map +1 -1
  162. package/dist/commands/uninstall.js +28 -2
  163. package/dist/commands/uninstall.js.map +1 -1
  164. package/dist/commands/update.d.ts.map +1 -1
  165. package/dist/commands/update.js +102 -5
  166. package/dist/commands/update.js.map +1 -1
  167. package/dist/commands/workflow.d.ts +35 -0
  168. package/dist/commands/workflow.d.ts.map +1 -0
  169. package/dist/commands/workflow.js +232 -0
  170. package/dist/commands/workflow.js.map +1 -0
  171. package/dist/configurators/claude.d.ts.map +1 -1
  172. package/dist/configurators/claude.js +1 -0
  173. package/dist/configurators/claude.js.map +1 -1
  174. package/dist/configurators/index.d.ts.map +1 -1
  175. package/dist/configurators/index.js +5 -0
  176. package/dist/configurators/index.js.map +1 -1
  177. package/dist/configurators/reasonix.d.ts +23 -0
  178. package/dist/configurators/reasonix.d.ts.map +1 -0
  179. package/dist/configurators/reasonix.js +60 -0
  180. package/dist/configurators/reasonix.js.map +1 -0
  181. package/dist/configurators/shared.d.ts.map +1 -1
  182. package/dist/configurators/shared.js +8 -0
  183. package/dist/configurators/shared.js.map +1 -1
  184. package/dist/configurators/workflow.d.ts +8 -0
  185. package/dist/configurators/workflow.d.ts.map +1 -1
  186. package/dist/configurators/workflow.js +14 -3
  187. package/dist/configurators/workflow.js.map +1 -1
  188. package/dist/constants/paths.d.ts +4 -0
  189. package/dist/constants/paths.d.ts.map +1 -1
  190. package/dist/constants/paths.js +4 -0
  191. package/dist/constants/paths.js.map +1 -1
  192. package/dist/migrations/manifests/0.5.14.json +9 -0
  193. package/dist/migrations/manifests/0.5.15.json +9 -0
  194. package/dist/migrations/manifests/0.5.16.json +9 -0
  195. package/dist/migrations/manifests/0.5.17.json +9 -0
  196. package/dist/migrations/manifests/0.5.18.json +9 -0
  197. package/dist/migrations/manifests/0.5.19.json +9 -0
  198. package/dist/migrations/manifests/0.6.0-beta.10.json +9 -0
  199. package/dist/migrations/manifests/0.6.0-beta.11.json +9 -0
  200. package/dist/migrations/manifests/0.6.0-beta.12.json +9 -0
  201. package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
  202. package/dist/migrations/manifests/0.6.0-beta.14.json +9 -0
  203. package/dist/migrations/manifests/0.6.0-beta.15.json +9 -0
  204. package/dist/migrations/manifests/0.6.0-beta.16.json +9 -0
  205. package/dist/migrations/manifests/0.6.0-beta.17.json +9 -0
  206. package/dist/migrations/manifests/0.6.0-beta.18.json +16 -0
  207. package/dist/migrations/manifests/0.6.0-beta.19.json +9 -0
  208. package/dist/migrations/manifests/0.6.0-beta.20.json +9 -0
  209. package/dist/migrations/manifests/0.6.0-beta.21.json +9 -0
  210. package/dist/migrations/manifests/0.6.0-beta.22.json +9 -0
  211. package/dist/migrations/manifests/0.6.0-beta.23.json +88 -0
  212. package/dist/migrations/manifests/0.6.0-rc.0.json +9 -0
  213. package/dist/templates/claude/agents/trellis-check.md +12 -6
  214. package/dist/templates/claude/agents/trellis-implement.md +1 -1
  215. package/dist/templates/claude/agents/trellis-research.md +1 -1
  216. package/dist/templates/codebuddy/agents/trellis-check.md +12 -6
  217. package/dist/templates/codebuddy/agents/trellis-implement.md +1 -1
  218. package/dist/templates/codebuddy/agents/trellis-research.md +1 -1
  219. package/dist/templates/codex/agents/trellis-check.toml +0 -25
  220. package/dist/templates/codex/agents/trellis-implement.toml +0 -25
  221. package/dist/templates/codex/config.toml +9 -16
  222. package/dist/templates/codex/hooks/session-start.py +22 -0
  223. package/dist/templates/codex/hooks.json +1 -1
  224. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +27 -0
  225. package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +81 -0
  226. package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +66 -0
  227. package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +93 -0
  228. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/SKILL.md +41 -0
  229. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/mcp-setup.md +90 -0
  230. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/repository-analysis.md +59 -0
  231. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-task-planning.md +61 -0
  232. package/dist/templates/common/bundled-skills/trellis-spec-bootstrap/references/spec-writing.md +70 -0
  233. package/dist/templates/copilot/hooks/session-start.py +24 -0
  234. package/dist/templates/cursor/agents/trellis-check.md +12 -6
  235. package/dist/templates/cursor/agents/trellis-implement.md +1 -1
  236. package/dist/templates/cursor/agents/trellis-research.md +1 -1
  237. package/dist/templates/cursor/hooks.json +0 -6
  238. package/dist/templates/droid/droids/trellis-check.md +12 -6
  239. package/dist/templates/droid/droids/trellis-implement.md +1 -1
  240. package/dist/templates/droid/droids/trellis-research.md +1 -1
  241. package/dist/templates/gemini/agents/trellis-check.md +11 -5
  242. package/dist/templates/kiro/agents/trellis-check.json +1 -1
  243. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +127 -9
  244. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +130 -0
  245. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +38 -0
  246. package/dist/templates/markdown/spec/guides/index.md.txt +18 -0
  247. package/dist/templates/opencode/agents/trellis-check.md +11 -5
  248. package/dist/templates/pi/agents/trellis-check.md +5 -4
  249. package/dist/templates/pi/agents/trellis-implement.md +5 -4
  250. package/dist/templates/pi/extensions/trellis/index.ts.txt +1339 -913
  251. package/dist/templates/pi/settings.json +0 -9
  252. package/dist/templates/qoder/agents/trellis-check.md +12 -6
  253. package/dist/templates/qoder/agents/trellis-implement.md +1 -1
  254. package/dist/templates/qoder/agents/trellis-research.md +1 -1
  255. package/dist/templates/reasonix/agents/trellis-check.md +36 -0
  256. package/dist/templates/reasonix/agents/trellis-implement.md +41 -0
  257. package/dist/templates/reasonix/index.d.ts +13 -0
  258. package/dist/templates/reasonix/index.d.ts.map +1 -0
  259. package/dist/templates/reasonix/index.js +16 -0
  260. package/dist/templates/reasonix/index.js.map +1 -0
  261. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  262. package/dist/templates/shared-hooks/index.js +0 -1
  263. package/dist/templates/shared-hooks/index.js.map +1 -1
  264. package/dist/templates/shared-hooks/inject-workflow-state.py +22 -0
  265. package/dist/templates/shared-hooks/session-start.py +25 -8
  266. package/dist/templates/trellis/agents/check.md +70 -0
  267. package/dist/templates/trellis/agents/implement.md +71 -0
  268. package/dist/templates/trellis/config.yaml +20 -0
  269. package/dist/templates/trellis/index.d.ts +13 -0
  270. package/dist/templates/trellis/index.d.ts.map +1 -1
  271. package/dist/templates/trellis/index.js +22 -0
  272. package/dist/templates/trellis/index.js.map +1 -1
  273. package/dist/templates/trellis/scripts/common/safe_commit.py +49 -19
  274. package/dist/templates/trellis/scripts/common/task_store.py +94 -16
  275. package/dist/templates/trellis/workflow.md +21 -0
  276. package/dist/types/ai-tools.d.ts +4 -4
  277. package/dist/types/ai-tools.d.ts.map +1 -1
  278. package/dist/types/ai-tools.js +16 -0
  279. package/dist/types/ai-tools.js.map +1 -1
  280. package/dist/utils/agent-refs.d.ts +31 -0
  281. package/dist/utils/agent-refs.d.ts.map +1 -0
  282. package/dist/utils/agent-refs.js +63 -0
  283. package/dist/utils/agent-refs.js.map +1 -0
  284. package/dist/utils/cwd-guard.d.ts +38 -0
  285. package/dist/utils/cwd-guard.d.ts.map +1 -0
  286. package/dist/utils/cwd-guard.js +62 -0
  287. package/dist/utils/cwd-guard.js.map +1 -0
  288. package/dist/utils/file-writer.d.ts +13 -0
  289. package/dist/utils/file-writer.d.ts.map +1 -1
  290. package/dist/utils/file-writer.js +59 -1
  291. package/dist/utils/file-writer.js.map +1 -1
  292. package/dist/utils/manifest-prune.d.ts +61 -0
  293. package/dist/utils/manifest-prune.d.ts.map +1 -0
  294. package/dist/utils/manifest-prune.js +136 -0
  295. package/dist/utils/manifest-prune.js.map +1 -0
  296. package/dist/utils/registry-config.d.ts +7 -0
  297. package/dist/utils/registry-config.d.ts.map +1 -0
  298. package/dist/utils/registry-config.js +171 -0
  299. package/dist/utils/registry-config.js.map +1 -0
  300. package/dist/utils/task-json.d.ts +9 -42
  301. package/dist/utils/task-json.d.ts.map +1 -1
  302. package/dist/utils/task-json.js +8 -45
  303. package/dist/utils/task-json.js.map +1 -1
  304. package/dist/utils/template-fetcher.d.ts +11 -0
  305. package/dist/utils/template-fetcher.d.ts.map +1 -1
  306. package/dist/utils/template-fetcher.js +51 -2
  307. package/dist/utils/template-fetcher.js.map +1 -1
  308. package/dist/utils/template-hash.d.ts +32 -6
  309. package/dist/utils/template-hash.d.ts.map +1 -1
  310. package/dist/utils/template-hash.js +53 -31
  311. package/dist/utils/template-hash.js.map +1 -1
  312. package/dist/utils/workflow-resolver.d.ts +86 -0
  313. package/dist/utils/workflow-resolver.d.ts.map +1 -0
  314. package/dist/utils/workflow-resolver.js +265 -0
  315. package/dist/utils/workflow-resolver.js.map +1 -0
  316. package/package.json +9 -8
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "0.6.0-beta.18",
3
+ "description": "Beta patch: channel worker OOM guard, simplified channel message routing, bundled Trellis spec bootstrap skill docs, and safer task archive auto-commit failures.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Enhancements:**\n- feat(channel): default OOM guard for `trellis channel spawn`. Workers that stay continuously idle past `channel.worker_guard.idle_timeout` (default `5m`) are self-terminated with `killed{reason:\"idle-timeout\"}`. Mid-turn workers are not killed by idle cleanup.\n- feat(channel): spawn-time live-worker budget per project/scope. Default `channel.worker_guard.max_live_workers: 6`. Expired idle workers are cleaned first; if the budget is still exhausted, `spawn` rejects with live-worker details and kill / override hints.\n- feat(channel): simplified worker message routing by removing message tags from channel send/wait/run internals.\n- feat(config): `.trellis/config.yaml` gains a `channel.worker_guard` section via `trellis update`.\n- feat(skills): Trellis beta bundle includes the built-in `trellis-spec-bootstarp` skill for bootstrapping `.trellis/spec/` from the real codebase.\n**Bug Fixes:**\n- fix(cli): `task.py archive` now fails when its auto-commit fails instead of reporting a successful archive with uncommitted changes.",
7
+ "migrations": [],
8
+ "configSectionsAdded": [
9
+ {
10
+ "file": ".trellis/config.yaml",
11
+ "sentinel": "worker_guard:",
12
+ "sectionHeading": "Channel worker OOM guard"
13
+ }
14
+ ],
15
+ "notes": "Beta patch on top of 0.6.0-beta.17. `trellis update` appends `channel.worker_guard` defaults for existing projects. To opt out, set `channel.worker_guard.idle_timeout: 0` and / or `channel.worker_guard.max_live_workers: 0`, or pass `--idle-timeout 0` / `--max-live-workers 0` per spawn."
16
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.19",
3
+ "description": "Beta patch: Pi trellis_subagent native progress cards, durable channel idempotency, task create/archive collision guard, workflow breadcrumb clarification, and Codex 0.131 timeout bounds.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Enhancements:**\n- feat(pi): Pi extension now exposes `trellis_subagent` with native progress cards, `single` / `parallel` / `chain` dispatch modes, throttled live updates, and Trellis-agent validation (#286, #290).\n**Bug Fixes:**\n- fix(core): channel `sendMessage` and `postThread` accept durable `idempotencyKey` values so retries return the original JSONL event and do not duplicate strict-delivery `undeliverable` events.\n- fix(cli): `task.py create` now rejects slugs that already exist under `.trellis/tasks/archive/**` and prints the archived path (#291).\n- fix(workflow): `[workflow-state:in_progress]` now distinguishes sub-agent types from skills so agents do not call missing `trellis-implement` / `trellis-research` skills (#283).\n- fix(codex): `.codex/config.toml` emits `min_wait_timeout_ms`, `default_wait_timeout_ms`, and `max_wait_timeout_ms` together so Codex CLI 0.131+ accepts merged multi_agent_v2 timeout config (#294).\n**Internal:**\n- chore(release): restore the shipped `0.5.17` migration manifest so manifest continuity and update-chain checks pass for the beta release.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.18. Run `trellis update` to refresh Pi, Codex, workflow, and task templates. No migration command is required."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.20",
3
+ "description": "Beta patch: bundle the Trellis spec bootstrap skill in the CLI package and clarify Codex CLI 0.131+ timeout-bounds requirements.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(skills): `trellis-spec-bootstarp` is now included under `dist/templates/common/bundled-skills/`, so fresh `trellis init` and `trellis update` install the built-in spec bootstrap skill and track its reference files.\n- fix(docs): the v0.6.0-beta.19 changelog now states that the full Codex `multi_agent_v2` timeout-bounds config requires Codex CLI 0.131.0+.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.19. Run `trellis update` to install the bundled `trellis-spec-bootstarp` skill. Codex users should use Codex CLI 0.131.0+ for the full multi_agent_v2 timeout-bounds config."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.21",
3
+ "description": "Beta patch: stop writing the [features.multi_agent_v2] block to the generated Codex config.toml so Codex CLI 0.130 and the Codex desktop app can load the config.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(codex): `trellis init` / `trellis update` no longer write a `[features.multi_agent_v2]` block to `.codex/config.toml`. Codex CLI changed `features` deserialization between 0.130 and 0.131; the structured table form is only accepted by 0.131+. On 0.130 and earlier — including the Codex CLI bundled in the Codex desktop app — it failed with `data did not match any variant of untagged enum FeatureToml in features.multi_agent_v2`, aborting the entire config load and blocking Codex from starting. Codex's own default for multi_agent_v2 is used instead.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.20. Run `trellis update` to regenerate `.codex/config.toml` without the multi_agent_v2 block. Tune multi_agent_v2 in your user-level ~/.codex/config.toml if needed."
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-beta.22",
3
+ "description": "Beta patch: remove the duplicated pull-based prelude from the generated Codex sub-agent toml files, and restore the 0.5.19 migration manifest that was missing on the beta branch.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(codex): the generated `.codex/agents/trellis-check.toml` and `trellis-implement.toml` no longer contain the \"Required: Load Trellis Context First\" prelude twice. The codex toml source templates carried an inline copy that predated the code-injected prelude (`injectPullBasedPreludeToml`); the injector then added a second copy. The inline copies are removed so the injector is the single source, and a regression test asserts the prelude appears exactly once across all class-2 platforms.\n- fix(migrations): restore `src/migrations/manifests/0.5.19.json`, which was missing on the 0.6.0-beta branch. Its absence broke the manifest-continuity guard and would break `trellis update` for users on 0.5.19.",
7
+ "migrations": [],
8
+ "notes": "Beta patch on top of 0.6.0-beta.21. Run `trellis update` to regenerate `.codex/agents/` without the duplicated prelude."
9
+ }
@@ -0,0 +1,88 @@
1
+ {
2
+ "version": "0.6.0-beta.23",
3
+ "description": "Beta patch: dispatch channel runtime agent definitions, refresh registry-backed spec via update, add Reasonix platform support, ship trellis-session-insight bundled skill, and rename trellis-spec-bootstarp → trellis-spec-bootstrap.",
4
+ "breaking": false,
5
+ "recommendMigrate": true,
6
+ "changelog": "**Enhancements:**\n- feat(cli): `trellis init` and `trellis update` now ship `.trellis/agents/{check,implement}.md`, so switching to a channel-driven workflow no longer fails with \"Agent 'check' not found\" (#323).\n- feat(cli): `trellis update` refreshes registry-backed `.trellis/spec` templates through the existing hash/conflict flow. `trellis init --template <id>` persists the spec source/template in `.trellis/config.yaml` so subsequent updates can re-fetch it. Supports direct spec registries and marketplace-style registries (#324).\n- feat(platform): add **Reasonix** (DeepSeek-Reasonix) as the 15th supported AI coding tool via `trellis init --reasonix`. Subagent skills (`trellis-implement`, `trellis-check`) carry `runAs: subagent` frontmatter so Reasonix spawns them as isolated subagent loops (#301).\n- feat(skills): bundle `trellis-session-insight` skill that teaches the AI how and when to reach for `trellis mem` to recall past conversations across Claude Code and Codex sessions. Auto-dispatched to every supported platform on init/update.\n- feat(workflow): `trellis workflow --template <id>` and `trellis init --workflow <id>` print a stderr warning when the resolved workflow references `.trellis/agents/<name>.md` files that are missing on disk, pointing the user at `trellis update`.\n\n**Bug Fixes:**\n- fix(skills): rename bundled `trellis-spec-bootstarp` → `trellis-spec-bootstrap` (typo). `trellis update --migrate` ships a `rename-dir` migration that renames the installed directory across 13 platform skill roots; missing roots are silently skipped. Historical migration manifests `0.5.17.json` and `0.6.0-beta.18.json` keep the typoed text because they describe what already shipped to users on those versions (#296).",
7
+ "migrations": [
8
+ {
9
+ "type": "rename-dir",
10
+ "from": ".claude/skills/trellis-spec-bootstarp",
11
+ "to": ".claude/skills/trellis-spec-bootstrap",
12
+ "description": "Claude Code: rename installed bundled skill directory from typoed name to corrected name."
13
+ },
14
+ {
15
+ "type": "rename-dir",
16
+ "from": ".cursor/skills/trellis-spec-bootstarp",
17
+ "to": ".cursor/skills/trellis-spec-bootstrap",
18
+ "description": "Cursor: rename installed bundled skill directory from typoed name to corrected name."
19
+ },
20
+ {
21
+ "type": "rename-dir",
22
+ "from": ".opencode/skills/trellis-spec-bootstarp",
23
+ "to": ".opencode/skills/trellis-spec-bootstrap",
24
+ "description": "OpenCode: rename installed bundled skill directory from typoed name to corrected name."
25
+ },
26
+ {
27
+ "type": "rename-dir",
28
+ "from": ".agents/skills/trellis-spec-bootstarp",
29
+ "to": ".agents/skills/trellis-spec-bootstrap",
30
+ "description": "Codex / Gemini CLI (shared): rename installed bundled skill directory from typoed name to corrected name."
31
+ },
32
+ {
33
+ "type": "rename-dir",
34
+ "from": ".kiro/skills/trellis-spec-bootstarp",
35
+ "to": ".kiro/skills/trellis-spec-bootstrap",
36
+ "description": "Kiro: rename installed bundled skill directory from typoed name to corrected name."
37
+ },
38
+ {
39
+ "type": "rename-dir",
40
+ "from": ".qoder/skills/trellis-spec-bootstarp",
41
+ "to": ".qoder/skills/trellis-spec-bootstrap",
42
+ "description": "Qoder: rename installed bundled skill directory from typoed name to corrected name."
43
+ },
44
+ {
45
+ "type": "rename-dir",
46
+ "from": ".codebuddy/skills/trellis-spec-bootstarp",
47
+ "to": ".codebuddy/skills/trellis-spec-bootstrap",
48
+ "description": "CodeBuddy: rename installed bundled skill directory from typoed name to corrected name."
49
+ },
50
+ {
51
+ "type": "rename-dir",
52
+ "from": ".github/skills/trellis-spec-bootstarp",
53
+ "to": ".github/skills/trellis-spec-bootstrap",
54
+ "description": "GitHub Copilot: rename installed bundled skill directory from typoed name to corrected name."
55
+ },
56
+ {
57
+ "type": "rename-dir",
58
+ "from": ".factory/skills/trellis-spec-bootstarp",
59
+ "to": ".factory/skills/trellis-spec-bootstrap",
60
+ "description": "Droid: rename installed bundled skill directory from typoed name to corrected name."
61
+ },
62
+ {
63
+ "type": "rename-dir",
64
+ "from": ".pi/skills/trellis-spec-bootstarp",
65
+ "to": ".pi/skills/trellis-spec-bootstrap",
66
+ "description": "Pi Agent: rename installed bundled skill directory from typoed name to corrected name."
67
+ },
68
+ {
69
+ "type": "rename-dir",
70
+ "from": ".agent/skills/trellis-spec-bootstarp",
71
+ "to": ".agent/skills/trellis-spec-bootstrap",
72
+ "description": "Antigravity: rename installed bundled skill directory from typoed name to corrected name."
73
+ },
74
+ {
75
+ "type": "rename-dir",
76
+ "from": ".windsurf/skills/trellis-spec-bootstarp",
77
+ "to": ".windsurf/skills/trellis-spec-bootstrap",
78
+ "description": "Windsurf: rename installed bundled skill directory from typoed name to corrected name."
79
+ },
80
+ {
81
+ "type": "rename-dir",
82
+ "from": ".kilocode/skills/trellis-spec-bootstarp",
83
+ "to": ".kilocode/skills/trellis-spec-bootstrap",
84
+ "description": "Kilo: rename installed bundled skill directory from typoed name to corrected name."
85
+ }
86
+ ],
87
+ "notes": "Beta patch on top of 0.6.0-beta.22. Run `trellis update --migrate` to rename installed `trellis-spec-bootstarp/` skill directories to `trellis-spec-bootstrap/` across every platform you have configured (silently skips ones you do not). Plain `trellis update` also installs the new `trellis-session-insight` bundled skill and the `.trellis/agents/{check,implement}.md` channel runtime files."
88
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "0.6.0-rc.0",
3
+ "description": "First release candidate for v0.6.0. Feature surface frozen; entering stabilization. Only fix since 0.6.0-beta.23 is removing explicit mcp__exa__* tools from bundled Claude-style sub-agent defs so they no longer silent-skip on installs without the Exa MCP server.",
4
+ "breaking": false,
5
+ "recommendMigrate": false,
6
+ "changelog": "**Bug Fixes:**\n- fix(agents): drop explicit `mcp__exa__*` tools from bundled `trellis-implement` and `trellis-check` agent definitions. Claude Code silently skips agent registration when an explicit MCP tool name fails to resolve, so users without the Exa MCP server installed had every Trellis sub-agent disappear from the dispatch list. `trellis-research` keeps external search by folding `mcp__exa__*` + `mcp__chrome-devtools__*` into a single `mcp__*` wildcard, which Claude Code resolves lazily and does not silent-skip on. OpenCode files use a different permission syntax and are unchanged (#302).\n\n**Internal:**\n- chore(release): v0.6 feature surface frozen at this RC. Open feature requests (#193, #318, #320, #325, #326, etc.) are deferred to v0.7 or later. Further changes on this line will be bug-only `0.6.0-rc.*` cuts.",
7
+ "migrations": [],
8
+ "notes": "First release candidate for v0.6.0. Run `npm install -g @mindfoldhq/trellis@rc && trellis update` to pick up the agent silent-skip fix. If you are coming from a beta older than 0.6.0-beta.23, also pass `--migrate` to apply the rename-dir migration that moves `trellis-spec-bootstarp/` to `trellis-spec-bootstrap/` across configured platform skill roots."
9
+ }
@@ -2,7 +2,7 @@
2
2
  name: trellis-check
3
3
  description: |
4
4
  Code quality check expert. Reviews code changes against specs and self-fixes issues.
5
- tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
+ tools: Read, Write, Edit, Bash, Glob, Grep
6
6
  ---
7
7
  # Check Agent
8
8
 
@@ -27,14 +27,18 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
27
27
 
28
28
  Before checking, read:
29
29
  - `.trellis/spec/` - Development guidelines
30
+ - Task `prd.md` - Requirements document
31
+ - Task `design.md` - Technical design (if exists)
32
+ - Task `implement.md` - Execution plan (if exists)
30
33
  - Pre-commit checklist for quality standards
31
34
 
32
35
  ## Core Responsibilities
33
36
 
34
37
  1. **Get code changes** - Use git diff to get uncommitted code
35
- 2. **Check against specs** - Verify code follows guidelines
36
- 3. **Self-fix** - Fix issues yourself, not just report them
37
- 4. **Run verification** - typecheck and lint
38
+ 2. **Review task artifacts** - Check changes against prd.md, design.md if present, and implement.md if present
39
+ 3. **Check against specs** - Verify code follows guidelines
40
+ 4. **Self-fix** - Fix issues yourself, not just report them
41
+ 5. **Run verification** - typecheck and lint
38
42
 
39
43
  ## Important
40
44
 
@@ -53,10 +57,12 @@ git diff --name-only # List changed files
53
57
  git diff # View specific changes
54
58
  ```
55
59
 
56
- ### Step 2: Check Against Specs
60
+ ### Step 2: Check Against Specs and Task Artifacts
57
61
 
58
- Read relevant specs in `.trellis/spec/` to check code:
62
+ Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.trellis/spec/` to check code:
59
63
 
64
+ - Does it satisfy the task requirements
65
+ - Does it follow the technical design and implementation plan when present
60
66
  - Does it follow directory structure conventions
61
67
  - Does it follow naming conventions
62
68
  - Does it follow code patterns
@@ -2,7 +2,7 @@
2
2
  name: trellis-implement
3
3
  description: |
4
4
  Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
5
- tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
+ tools: Read, Write, Edit, Bash, Glob, Grep
6
6
  ---
7
7
  # Implement Agent
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: trellis-research
3
3
  description: |
4
4
  Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
5
- tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
5
+ tools: Read, Write, Glob, Grep, Bash, Skill, mcp__*
6
6
  ---
7
7
  # Research Agent
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: trellis-check
3
3
  description: |
4
4
  Code quality check expert. Reviews code changes against specs and self-fixes issues.
5
- tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
+ tools: Read, Write, Edit, Bash, Glob, Grep
6
6
  ---
7
7
  # Check Agent
8
8
 
@@ -27,14 +27,18 @@ Look for the `<!-- trellis-hook-injected -->` marker in your input above.
27
27
 
28
28
  Before checking, read:
29
29
  - `.trellis/spec/` - Development guidelines
30
+ - Task `prd.md` - Requirements document
31
+ - Task `design.md` - Technical design (if exists)
32
+ - Task `implement.md` - Execution plan (if exists)
30
33
  - Pre-commit checklist for quality standards
31
34
 
32
35
  ## Core Responsibilities
33
36
 
34
37
  1. **Get code changes** - Use git diff to get uncommitted code
35
- 2. **Check against specs** - Verify code follows guidelines
36
- 3. **Self-fix** - Fix issues yourself, not just report them
37
- 4. **Run verification** - typecheck and lint
38
+ 2. **Review task artifacts** - Check changes against prd.md, design.md if present, and implement.md if present
39
+ 3. **Check against specs** - Verify code follows guidelines
40
+ 4. **Self-fix** - Fix issues yourself, not just report them
41
+ 5. **Run verification** - typecheck and lint
38
42
 
39
43
  ## Important
40
44
 
@@ -53,10 +57,12 @@ git diff --name-only # List changed files
53
57
  git diff # View specific changes
54
58
  ```
55
59
 
56
- ### Step 2: Check Against Specs
60
+ ### Step 2: Check Against Specs and Task Artifacts
57
61
 
58
- Read relevant specs in `.trellis/spec/` to check code:
62
+ Read the task's prd.md, design.md if present, and implement.md if present, then read relevant specs in `.trellis/spec/` to check code:
59
63
 
64
+ - Does it satisfy the task requirements
65
+ - Does it follow the technical design and implementation plan when present
60
66
  - Does it follow directory structure conventions
61
67
  - Does it follow naming conventions
62
68
  - Does it follow code patterns
@@ -2,7 +2,7 @@
2
2
  name: trellis-implement
3
3
  description: |
4
4
  Code implementation expert. Understands specs and requirements, then implements features. No git commit allowed.
5
- tools: Read, Write, Edit, Bash, Glob, Grep, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa
5
+ tools: Read, Write, Edit, Bash, Glob, Grep
6
6
  ---
7
7
  # Implement Agent
8
8
 
@@ -2,7 +2,7 @@
2
2
  name: trellis-research
3
3
  description: |
4
4
  Code and tech search expert. Finds files, patterns, and tech solutions, and PERSISTS every finding to the current task's research/ directory. No code modifications outside that directory.
5
- tools: Read, Write, Glob, Grep, Bash, mcp__exa__web_search_exa, mcp__exa__get_code_context_exa, Skill, mcp__chrome-devtools__*
5
+ tools: Read, Write, Glob, Grep, Bash, Skill, mcp__*
6
6
  ---
7
7
  # Research Agent
8
8
 
@@ -12,31 +12,6 @@ CRITICAL — Recursion guard (read first):
12
12
 
13
13
  ---
14
14
 
15
- ## Required: Load Trellis Context First
16
-
17
- This platform does NOT auto-inject task context via hook. Before doing anything else, you MUST load context yourself.
18
-
19
- ### Step 1: Find the active task path
20
-
21
- Try in order — stop at the first one that yields a task path:
22
-
23
- 1. **Look at the dispatch prompt** you received from the main agent. If its first line is `Active task: <path>` (e.g. `Active task: .trellis/tasks/04-17-foo`), use that path. The main agent is required to include this line on class-2 platforms.
24
- 2. **Run** `python3 ./.trellis/scripts/task.py current --source` and read the `Current task:` line.
25
- 3. **If both fail** (no `Active task:` line in the prompt and `task.py current` returns no task), ask the user which task to work on; do NOT guess.
26
-
27
- ### Step 2: Load task context from the resolved path
28
-
29
- 1. Read `<task-path>/check.jsonl` — JSONL list of spec/research files relevant to this agent.
30
- 2. For each entry in the JSONL, Read its `file` path — these are the specs and research notes you must follow.
31
- **Skip rows without a `"file"` field** (e.g. `{"_example": "..."}` seed rows left over from `task.py create` before the curator ran).
32
- 3. Read the task's `prd.md` (requirements), then `design.md` if present (technical design), then `implement.md` if present (execution plan).
33
-
34
- If `check.jsonl` has no curated entries (only a seed row, or the file is missing), fall back to: read the task artifacts, list available specs with `python3 ./.trellis/scripts/get_context.py --mode packages`, and pick the specs that match the task domain yourself. Do NOT block on the missing jsonl — lightweight tasks may be PRD-only, while complex tasks may also include `design.md` and `implement.md`.
35
-
36
- If the resolved task path has no `prd.md`, ask the user what to work on; do NOT proceed without context.
37
-
38
- ---
39
-
40
15
  You are the Trellis reviewer agent.
41
16
 
42
17
  Your job is to review code changes against specs AND fix issues directly — not just report them. You have write access; use it.
@@ -12,31 +12,6 @@ CRITICAL — Recursion guard (read first):
12
12
 
13
13
  ---
14
14
 
15
- ## Required: Load Trellis Context First
16
-
17
- This platform does NOT auto-inject task context via hook. Before doing anything else, you MUST load context yourself.
18
-
19
- ### Step 1: Find the active task path
20
-
21
- Try in order — stop at the first one that yields a task path:
22
-
23
- 1. **Look at the dispatch prompt** you received from the main agent. If its first line is `Active task: <path>` (e.g. `Active task: .trellis/tasks/04-17-foo`), use that path. The main agent is required to include this line on class-2 platforms.
24
- 2. **Run** `python3 ./.trellis/scripts/task.py current --source` and read the `Current task:` line.
25
- 3. **If both fail** (no `Active task:` line in the prompt and `task.py current` returns no task), ask the user which task to work on; do NOT guess.
26
-
27
- ### Step 2: Load task context from the resolved path
28
-
29
- 1. Read `<task-path>/implement.jsonl` — JSONL list of spec/research files relevant to this agent.
30
- 2. For each entry in the JSONL, Read its `file` path — these are the specs and research notes you must follow.
31
- **Skip rows without a `"file"` field** (e.g. `{"_example": "..."}` seed rows left over from `task.py create` before the curator ran).
32
- 3. Read the task's `prd.md` (requirements), then `design.md` if present (technical design), then `implement.md` if present (execution plan).
33
-
34
- If `implement.jsonl` has no curated entries (only a seed row, or the file is missing), fall back to: read the task artifacts, list available specs with `python3 ./.trellis/scripts/get_context.py --mode packages`, and pick the specs that match the task domain yourself. Do NOT block on the missing jsonl — lightweight tasks may be PRD-only, while complex tasks may also include `design.md` and `implement.md`.
35
-
36
- If the resolved task path has no `prd.md`, ask the user what to work on; do NOT proceed without context.
37
-
38
- ---
39
-
40
15
  You are the Trellis implementer agent.
41
16
 
42
17
  Rules:
@@ -5,8 +5,6 @@
5
5
  #
6
6
  # [projects."/abs/path/to/this/repo"]
7
7
  # trust_level = "trusted"
8
- #
9
- # Without trust, the [features] block below is loaded but disabled.
10
8
 
11
9
  # Keep AGENTS.md as the primary project instruction file.
12
10
  project_doc_fallback_filenames = ["AGENTS.md"]
@@ -19,17 +17,12 @@ project_doc_fallback_filenames = ["AGENTS.md"]
19
17
  # Codex 0.129+ additionally gates each installed hook behind a one-time
20
18
  # `/hooks` TUI review; until the user approves it, the hook stays inactive.
21
19
 
22
- # multi_agent_v2 forces structured subagent orchestration with the
23
- # `wait` tool parent must block on terminal status before acting,
24
- # instead of cancelling / re-spawning. Incompatible with
25
- # [agents].max_threads (codex will reject the combination).
26
- # `enabled = true` is required inside the table the table form does
27
- # NOT auto-enable the feature without it.
28
- # - max_concurrent_threads_per_session: bumps default 4 6.
29
- # - min_wait_timeout_ms: 480000 ms = 8 min. Codex default is 10 s, too
30
- # short for Trellis subagents that routinely take 2-10 min. Hard
31
- # ceiling is 3,600,000 (1 h).
32
- [features.multi_agent_v2]
33
- enabled = true
34
- max_concurrent_threads_per_session = 6
35
- min_wait_timeout_ms = 480000
20
+ # NOTE: Trellis intentionally does NOT write a [features.multi_agent_v2]
21
+ # block here. Codex CLI changed `features` deserialization between 0.130
22
+ # and 0.131: the structured table form (with max_concurrent_threads_per_session
23
+ # / *_wait_timeout_ms) is only accepted by 0.131+. On 0.130 and earlier
24
+ # including the codex CLI bundled inside the Codex desktop app it fails
25
+ # with `data did not match any variant of untagged enum FeatureToml`, which
26
+ # aborts the entire config load and blocks Codex from starting. Codex's own
27
+ # default for multi_agent_v2 is used instead; tune it in your user-level
28
+ # config if needed.
@@ -18,6 +18,28 @@ import warnings
18
18
  from io import StringIO
19
19
  from pathlib import Path
20
20
 
21
+ # Force UTF-8 on stdin/stdout/stderr on Windows. Default codepage there is
22
+ # cp936 / cp1252 / etc. — non-ASCII content (Chinese task names, prd snippets)
23
+ # both in stdin (hook payload from host CLI) and stdout (our emitted blocks)
24
+ # raises UnicodeDecodeError / UnicodeEncodeError. Equivalent to `python -X utf8`
25
+ # but applied per-stream so we don't depend on host CLI's command wiring.
26
+ if sys.platform.startswith("win"):
27
+ import io as _io
28
+ for _stream_name in ("stdin", "stdout", "stderr"):
29
+ _stream = getattr(sys, _stream_name, None)
30
+ if _stream is None:
31
+ continue
32
+ if hasattr(_stream, "reconfigure"):
33
+ try:
34
+ _stream.reconfigure(encoding="utf-8", errors="replace") # type: ignore[union-attr]
35
+ except Exception:
36
+ pass
37
+ elif hasattr(_stream, "detach"):
38
+ try:
39
+ setattr(sys, _stream_name, _io.TextIOWrapper(_stream.detach(), encoding="utf-8", errors="replace"))
40
+ except Exception:
41
+ pass
42
+
21
43
 
22
44
  def _normalize_windows_shell_path(path_str: str) -> str:
23
45
  """Normalize Unix-style shell paths to real Windows paths.
@@ -5,7 +5,7 @@
5
5
  "hooks": [
6
6
  {
7
7
  "type": "command",
8
- "command": "{{PYTHON_CMD}} .codex/hooks/inject-workflow-state.py",
8
+ "command": "{{PYTHON_CMD}} -X utf8 .codex/hooks/inject-workflow-state.py",
9
9
  "timeout": 15
10
10
  }
11
11
  ]
@@ -44,6 +44,33 @@ The Trellis task system is stored entirely under `.trellis/tasks/` in the user p
44
44
  | `commit` / `pr_url` | Commit and PR information after completion. |
45
45
  | `meta` | Extension fields. |
46
46
 
47
+ ## Parent / Child Task Trees
48
+
49
+ Parent/child task relationships are for work structure. A parent task groups related deliverables under one source requirement set; it is not a dependency scheduler and does not replace the child task's own planning artifacts.
50
+
51
+ Use a parent task when a request has multiple independently verifiable deliverables. The parent owns:
52
+
53
+ - Source requirements and user-facing scope.
54
+ - The map of child tasks and their responsibility boundaries.
55
+ - Cross-child acceptance criteria and final integration review.
56
+
57
+ Use child tasks for deliverables that can move through planning, implementation, check, and archive independently. If one child depends on another, write that dependency in the child `prd.md` / `implement.md`; do not rely on tree position to imply ordering.
58
+
59
+ Create new children with:
60
+
61
+ ```bash
62
+ python3 ./.trellis/scripts/task.py create "<child title>" --slug <child-slug> --parent <parent-dir>
63
+ ```
64
+
65
+ Link or unlink existing tasks with:
66
+
67
+ ```bash
68
+ python3 ./.trellis/scripts/task.py add-subtask <parent-dir> <child-dir>
69
+ python3 ./.trellis/scripts/task.py remove-subtask <parent-dir> <child-dir>
70
+ ```
71
+
72
+ `children` on the parent is a historical list. When a child is archived, Trellis keeps that child name in the parent so progress like `[2/3 done]` remains meaningful after completed children move to `archive/`.
73
+
47
74
  The AI should not treat phase numbers as task status. Task progress is mainly determined by `status`, artifact presence (`prd.md`, optional `design.md` / `implement.md`), whether JSONL context is configured for sub-agent mode, and the phase descriptions in `workflow.md`.
48
75
 
49
76
  ## Active Task
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: trellis-session-insight
3
+ description: "Reach into past AI conversation history through the `trellis mem` CLI. Use whenever the user asks 'how did we solve X last time', 'have we discussed this before', 'what was the decision on X', 'remind me what we did in this task', '上次怎么解的', '之前讨论过吗', '想起一段对话', or when starting a brainstorm that overlaps prior work, debugging a familiar bug, continuing a task across sessions, or doing a finish-work review. Returns raw past dialogue; decide for the moment whether to update spec, append to task notes, quote inline in the answer, or just internalize."
4
+ ---
5
+
6
+ # Trellis Session Insight
7
+
8
+ This skill teaches an AI **how to call `trellis mem`** — the project's cross-session memory feedstock — and **when reaching for it is the right move**.
9
+
10
+ It is intentionally a **capability skill, not a workflow**. There is no fixed output file, no required write-back step, no "always run after finish-work" rule. What to do with what `mem` returns is a judgement call made in the moment of the conversation. The skill exists so the AI knows the capability is there and can decide.
11
+
12
+ ## What `trellis mem` is
13
+
14
+ A local CLI that indexes the user's past Claude Code and Codex conversation logs (the JSONL files each platform stores under `~/.claude/projects/` and `~/.codex/sessions/`) and lets you list, search, slice by Trellis task boundaries, and dump cleaned dialogue from them. OpenCode logs are not yet indexable (provider adapter pending) — when an OpenCode session is the obvious target, surface that limitation rather than guessing.
15
+
16
+ Nothing in `mem` is uploaded. All reads are local.
17
+
18
+ ## When to reach for it
19
+
20
+ The bar is "would a senior teammate ask 'didn't we already talk about this?'" — those are the moments. Some concrete patterns:
21
+
22
+ - **Brainstorm rerun risk.** Starting a new task that touches an area the user has been in before, and you want to check whether a decision was already made — before re-asking the user.
23
+ - **Familiar-bug debugging.** The current bug pattern feels like one the user reported / fixed before. Pulling the relevant past session can save a full debugging loop.
24
+ - **Cross-session continuation.** The user resumes work after a gap and says "where were we" / "继续上次的" without being specific.
25
+ - **Decision retrieval.** The user references "the decision we made about X" but the decision lives in an old brainstorm, not in any `prd.md` / `spec/`.
26
+ - **Finish-work retrospective.** When the user explicitly asks for a wrap-up of what was decided / what hurt / what surprised them in this task — not as a forced step on every finish-work.
27
+ - **Pattern-spotting across past work.** The user asks "do I keep making the same mistake on X" / "我每次都踩这个坑吗" — search across sessions answers that.
28
+
29
+ If none of these apply, don't call `mem`. It is a tool, not a ceremony.
30
+
31
+ ## When NOT to reach for it
32
+
33
+ - The relevant context is already in the current turn, `prd.md`, `design.md`, recent `git log`, or the open files. `mem` is for stuff that has fallen out of immediate reach.
34
+ - The user is asking about a fact in the code, not a fact from a past conversation. `git log -p` / `grep` / reading the file directly is faster and more authoritative.
35
+ - You are in a sub-agent (`trellis-implement` / `trellis-check`) whose dispatch prompt already includes the curated `implement.jsonl` / `check.jsonl` context. Adding `mem` on top usually just clutters.
36
+ - The user has explicitly said "don't dig through history, just answer what I asked".
37
+
38
+ ## What to do with what `mem` returns
39
+
40
+ Treat the output as **raw material**, not a deliverable. Once you have it, decide based on the live conversation:
41
+
42
+ - **Quote inline in your reply** if a specific past exchange answers the user's current question — and cite the session-id / phase so the user can verify.
43
+ - **Update `<task>/prd.md` or `<task>/design.md`** if `mem` surfaced a load-bearing decision that should have been written down but wasn't. Surface the proposed edit to the user first.
44
+ - **Append to a task-local notes file** (e.g. `<task>/notes.md` or extending an existing one) if the finding belongs to the current task's record but doesn't fit the PRD.
45
+ - **Update `.trellis/spec/`** if the finding is a project-wide convention or gotcha that would help future tasks. Run the `trellis-update-spec` skill for that — `session-insight` ends at the discovery.
46
+ - **Just absorb it** for the next few turns and answer better, without writing anything. This is often the right move for one-off recall.
47
+
48
+ Trellis does not prescribe a single destination. Forcing every recall into a fixed file makes the file grow into noise. Let the situation decide.
49
+
50
+ ## How to call it
51
+
52
+ Full CLI reference is in `references/cli-quick-reference.md`. The 80% case is one of:
53
+
54
+ ```bash
55
+ # Find sessions whose contents mention a keyword (project-scope is default;
56
+ # add --global to search every project on this machine).
57
+ trellis mem search "<keyword>"
58
+
59
+ # Dump dialogue from one session, optionally filtered by phase or keyword.
60
+ trellis mem extract <session-id> --phase brainstorm
61
+ trellis mem extract <session-id> --grep "<keyword>"
62
+
63
+ # Drill into a session: top-N hit turns + surrounding context.
64
+ trellis mem context <session-id> --turns 3 --around 2
65
+
66
+ # When you do not know the session id yet, start with list + filter.
67
+ trellis mem list --task <task-dir>
68
+ trellis mem projects # → list active project cwds, then narrow
69
+ ```
70
+
71
+ Phase slicing (`--phase brainstorm|implement|all`) cuts the session at `task.py create` and `task.py start` boundaries. For a finish-work review of the current task, `--phase brainstorm` recovers the planning discussion and `--phase implement` recovers the execution loop. Default is `all`.
72
+
73
+ ## Triggering patterns
74
+
75
+ `references/triggering-patterns.md` lists more verbatim user phrasings (English + Chinese) that should make you think "reach for `mem`" — keep that handy when training instinct.
76
+
77
+ ## Out of scope
78
+
79
+ - `mem` does not edit code or update files. Any write-back is your decision in the moment.
80
+ - `mem` is read-only on the platform JSONL stores. It does not push or sync to remote.
81
+ - This skill does not replace `trellis-update-spec` (which is the right tool for promoting a finding into project-wide guidance) or the platform-native task / spec workflow.
@@ -0,0 +1,66 @@
1
+ # `trellis mem` CLI Reference
2
+
3
+ Full flag reference for the five subcommands. Pin this as the authoritative source — `trellis mem help` prints the same content at runtime, so anything here that drifts is a bug.
4
+
5
+ ## Subcommands
6
+
7
+ | Command | Purpose |
8
+ |---|---|
9
+ | `list` | List sessions. Default subcommand when none is given. |
10
+ | `search <keyword>` | Find sessions whose contents match a keyword. |
11
+ | `context <session-id>` | Drill into one session: top-N hit turns + surrounding context. Pair with `--grep` for keyword anchoring. |
12
+ | `extract <session-id>` | Dump cleaned dialogue. Combine with `--phase` / `--grep` to slice. |
13
+ | `projects` | List active project `cwd` values with session counts. Use this to discover which `--cwd` to pass to other subcommands. |
14
+
15
+ ## Flags (apply where meaningful)
16
+
17
+ | Flag | Subcommands | Meaning |
18
+ |---|---|---|
19
+ | `--platform claude\|codex\|opencode\|all` | all | Default `all`. OpenCode adapter is currently a stub on `0.6.0-beta.*` — see "Caveats" below. |
20
+ | `--since YYYY-MM-DD` | list / search | Inclusive lower date bound. |
21
+ | `--until YYYY-MM-DD` | list / search | Inclusive upper date bound. |
22
+ | `--global` | list / search | Include sessions from every project on this machine. Default is the current project `cwd`. |
23
+ | `--cwd <path>` | list / search | Force a specific project cwd instead of inferring from where you are. |
24
+ | `--limit N` | list / search | Cap output rows. Default `50`. |
25
+ | `--grep KW` | extract / context | Filter turns by keyword. Multi-token AND when whitespace-separated. |
26
+ | `--phase brainstorm\|implement\|all` | extract | Slice session by Trellis task boundaries. `brainstorm` = `[task.py create, task.py start)`. `implement` = `[task.py start, task.py finish)` window. Default `all`. |
27
+ | `--turns N` | context | Number of hit turns to return. Default `3`. |
28
+ | `--around N` | context | Surrounding turns to include per hit. Default `1`. |
29
+ | `--max-chars N` | context | Total character budget. Default `6000` (~1500 tokens). |
30
+ | `--include-children` | search / context | Merge OpenCode sub-agent sessions into their parent session. |
31
+ | `--json` | all | Emit machine-parseable JSON instead of human-readable output. |
32
+ | `--task <task-dir>` | list | Narrow to sessions whose context-key resolved to a given task directory (uses `.trellis/.runtime/sessions/*.json`). |
33
+
34
+ ## Common one-liners
35
+
36
+ ```bash
37
+ # What past sessions discussed "deadlock" anywhere on this machine?
38
+ trellis mem search "deadlock" --global --limit 20
39
+
40
+ # Inside a specific session, surface the top 5 turns that mention "lock contention"
41
+ # plus 2 turns of surrounding context.
42
+ trellis mem context 5842592d --grep "lock contention" --turns 5 --around 2
43
+
44
+ # Recover the brainstorm window for a session — useful when continuing a task
45
+ # the user started a week ago.
46
+ trellis mem extract 5842592d --phase brainstorm
47
+
48
+ # List every project this machine has Trellis sessions for, with counts.
49
+ trellis mem projects
50
+ ```
51
+
52
+ ## Output shapes
53
+
54
+ - **Default human output** (no `--json`): wrapped to a terminal, with session ids highlighted and turn markers visible. Suitable to read inline but messy to paste into a markdown file.
55
+ - **`--json`**: stable schema, safe to parse and process. When piping `mem` output into a follow-up step (e.g. summarizing for a Lessons section), prefer `--json`.
56
+
57
+ ## Caveats
58
+
59
+ - **OpenCode adapter is a stub on `0.6.0-beta.*`.** When `--platform` resolves to OpenCode (or `all` and OpenCode would be included), `mem` prints a one-line "reader unavailable" notice and continues with the other platforms. Don't promise OpenCode coverage in your reply until the adapter ships.
60
+ - **`--phase` slicing depends on `task.py create` / `task.py start` invocations appearing in the recorded bash calls of the session.** Sessions where the user ran `task.py` from a different terminal — outside the recorded AI loop — will not have phase boundaries. `--phase all` is the safe fallback.
61
+ - **`mem` indexes platform JSONL files directly.** If the user has cleared their Claude / Codex session storage, `mem` cannot recover what is no longer on disk.
62
+ - **`mem` is read-only.** No remote sync, no edits to platform JSONL. Any write you do based on `mem` findings is your own follow-up call into the editing tools available to you.
63
+
64
+ ## When you need more than this reference
65
+
66
+ Run `trellis mem help` in the user's shell. The runtime help is authoritative and will be ahead of this reference during fast-moving beta releases.