@mindfoldhq/trellis 0.6.0-beta.2 → 0.6.0-beta.20

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 (330) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/index.d.ts +1 -1
  3. package/dist/cli/index.d.ts.map +1 -1
  4. package/dist/cli/index.js +58 -2
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/commands/channel/adapters/claude.d.ts +29 -0
  7. package/dist/commands/channel/adapters/claude.d.ts.map +1 -0
  8. package/dist/commands/channel/adapters/claude.js +203 -0
  9. package/dist/commands/channel/adapters/claude.js.map +1 -0
  10. package/dist/commands/channel/adapters/codex.d.ts +85 -0
  11. package/dist/commands/channel/adapters/codex.d.ts.map +1 -0
  12. package/dist/commands/channel/adapters/codex.js +505 -0
  13. package/dist/commands/channel/adapters/codex.js.map +1 -0
  14. package/dist/commands/channel/adapters/index.d.ts +84 -0
  15. package/dist/commands/channel/adapters/index.d.ts.map +1 -0
  16. package/dist/commands/channel/adapters/index.js +115 -0
  17. package/dist/commands/channel/adapters/index.js.map +1 -0
  18. package/dist/commands/channel/adapters/types.d.ts +33 -0
  19. package/dist/commands/channel/adapters/types.d.ts.map +1 -0
  20. package/dist/commands/channel/adapters/types.js +2 -0
  21. package/dist/commands/channel/adapters/types.js.map +1 -0
  22. package/dist/commands/channel/agent-loader.d.ts +32 -0
  23. package/dist/commands/channel/agent-loader.d.ts.map +1 -0
  24. package/dist/commands/channel/agent-loader.js +154 -0
  25. package/dist/commands/channel/agent-loader.js.map +1 -0
  26. package/dist/commands/channel/context-loader.d.ts +26 -0
  27. package/dist/commands/channel/context-loader.d.ts.map +1 -0
  28. package/dist/commands/channel/context-loader.js +290 -0
  29. package/dist/commands/channel/context-loader.js.map +1 -0
  30. package/dist/commands/channel/context.d.ts +16 -0
  31. package/dist/commands/channel/context.d.ts.map +1 -0
  32. package/dist/commands/channel/context.js +83 -0
  33. package/dist/commands/channel/context.js.map +1 -0
  34. package/dist/commands/channel/create.d.ts +27 -0
  35. package/dist/commands/channel/create.d.ts.map +1 -0
  36. package/dist/commands/channel/create.js +39 -0
  37. package/dist/commands/channel/create.js.map +1 -0
  38. package/dist/commands/channel/dev-parse-trace.d.ts +14 -0
  39. package/dist/commands/channel/dev-parse-trace.d.ts.map +1 -0
  40. package/dist/commands/channel/dev-parse-trace.js +70 -0
  41. package/dist/commands/channel/dev-parse-trace.js.map +1 -0
  42. package/dist/commands/channel/guard.d.ts +150 -0
  43. package/dist/commands/channel/guard.d.ts.map +1 -0
  44. package/dist/commands/channel/guard.js +474 -0
  45. package/dist/commands/channel/guard.js.map +1 -0
  46. package/dist/commands/channel/index.d.ts +3 -0
  47. package/dist/commands/channel/index.d.ts.map +1 -0
  48. package/dist/commands/channel/index.js +531 -0
  49. package/dist/commands/channel/index.js.map +1 -0
  50. package/dist/commands/channel/interrupt.d.ts +10 -0
  51. package/dist/commands/channel/interrupt.d.ts.map +1 -0
  52. package/dist/commands/channel/interrupt.js +22 -0
  53. package/dist/commands/channel/interrupt.js.map +1 -0
  54. package/dist/commands/channel/kill.d.ts +7 -0
  55. package/dist/commands/channel/kill.d.ts.map +1 -0
  56. package/dist/commands/channel/kill.js +121 -0
  57. package/dist/commands/channel/kill.js.map +1 -0
  58. package/dist/commands/channel/list.d.ts +17 -0
  59. package/dist/commands/channel/list.d.ts.map +1 -0
  60. package/dist/commands/channel/list.js +233 -0
  61. package/dist/commands/channel/list.js.map +1 -0
  62. package/dist/commands/channel/messages.d.ts +15 -0
  63. package/dist/commands/channel/messages.d.ts.map +1 -0
  64. package/dist/commands/channel/messages.js +245 -0
  65. package/dist/commands/channel/messages.js.map +1 -0
  66. package/dist/commands/channel/rm.d.ts +27 -0
  67. package/dist/commands/channel/rm.d.ts.map +1 -0
  68. package/dist/commands/channel/rm.js +216 -0
  69. package/dist/commands/channel/rm.js.map +1 -0
  70. package/dist/commands/channel/run.d.ts +30 -0
  71. package/dist/commands/channel/run.d.ts.map +1 -0
  72. package/dist/commands/channel/run.js +130 -0
  73. package/dist/commands/channel/run.js.map +1 -0
  74. package/dist/commands/channel/send.d.ts +11 -0
  75. package/dist/commands/channel/send.d.ts.map +1 -0
  76. package/dist/commands/channel/send.js +24 -0
  77. package/dist/commands/channel/send.js.map +1 -0
  78. package/dist/commands/channel/spawn.d.ts +40 -0
  79. package/dist/commands/channel/spawn.d.ts.map +1 -0
  80. package/dist/commands/channel/spawn.js +244 -0
  81. package/dist/commands/channel/spawn.js.map +1 -0
  82. package/dist/commands/channel/store/events.d.ts +39 -0
  83. package/dist/commands/channel/store/events.d.ts.map +1 -0
  84. package/dist/commands/channel/store/events.js +87 -0
  85. package/dist/commands/channel/store/events.js.map +1 -0
  86. package/dist/commands/channel/store/filter.d.ts +3 -0
  87. package/dist/commands/channel/store/filter.d.ts.map +1 -0
  88. package/dist/commands/channel/store/filter.js +2 -0
  89. package/dist/commands/channel/store/filter.js.map +1 -0
  90. package/dist/commands/channel/store/lock.d.ts +23 -0
  91. package/dist/commands/channel/store/lock.d.ts.map +1 -0
  92. package/dist/commands/channel/store/lock.js +99 -0
  93. package/dist/commands/channel/store/lock.js.map +1 -0
  94. package/dist/commands/channel/store/paths.d.ts +63 -0
  95. package/dist/commands/channel/store/paths.d.ts.map +1 -0
  96. package/dist/commands/channel/store/paths.js +246 -0
  97. package/dist/commands/channel/store/paths.js.map +1 -0
  98. package/dist/commands/channel/store/schema.d.ts +27 -0
  99. package/dist/commands/channel/store/schema.d.ts.map +1 -0
  100. package/dist/commands/channel/store/schema.js +34 -0
  101. package/dist/commands/channel/store/schema.js.map +1 -0
  102. package/dist/commands/channel/store/thread-state.d.ts +5 -0
  103. package/dist/commands/channel/store/thread-state.d.ts.map +1 -0
  104. package/dist/commands/channel/store/thread-state.js +16 -0
  105. package/dist/commands/channel/store/thread-state.js.map +1 -0
  106. package/dist/commands/channel/store/watch.d.ts +19 -0
  107. package/dist/commands/channel/store/watch.d.ts.map +1 -0
  108. package/dist/commands/channel/store/watch.js +146 -0
  109. package/dist/commands/channel/store/watch.js.map +1 -0
  110. package/dist/commands/channel/supervisor/idle.d.ts +46 -0
  111. package/dist/commands/channel/supervisor/idle.d.ts.map +1 -0
  112. package/dist/commands/channel/supervisor/idle.js +72 -0
  113. package/dist/commands/channel/supervisor/idle.js.map +1 -0
  114. package/dist/commands/channel/supervisor/inbox.d.ts +30 -0
  115. package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -0
  116. package/dist/commands/channel/supervisor/inbox.js +160 -0
  117. package/dist/commands/channel/supervisor/inbox.js.map +1 -0
  118. package/dist/commands/channel/supervisor/shutdown.d.ts +68 -0
  119. package/dist/commands/channel/supervisor/shutdown.d.ts.map +1 -0
  120. package/dist/commands/channel/supervisor/shutdown.js +146 -0
  121. package/dist/commands/channel/supervisor/shutdown.js.map +1 -0
  122. package/dist/commands/channel/supervisor/stdout.d.ts +51 -0
  123. package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -0
  124. package/dist/commands/channel/supervisor/stdout.js +121 -0
  125. package/dist/commands/channel/supervisor/stdout.js.map +1 -0
  126. package/dist/commands/channel/supervisor/turns.d.ts +31 -0
  127. package/dist/commands/channel/supervisor/turns.d.ts.map +1 -0
  128. package/dist/commands/channel/supervisor/turns.js +45 -0
  129. package/dist/commands/channel/supervisor/turns.js.map +1 -0
  130. package/dist/commands/channel/supervisor/warning.d.ts +48 -0
  131. package/dist/commands/channel/supervisor/warning.d.ts.map +1 -0
  132. package/dist/commands/channel/supervisor/warning.js +77 -0
  133. package/dist/commands/channel/supervisor/warning.js.map +1 -0
  134. package/dist/commands/channel/supervisor.d.ts +59 -0
  135. package/dist/commands/channel/supervisor.d.ts.map +1 -0
  136. package/dist/commands/channel/supervisor.js +344 -0
  137. package/dist/commands/channel/supervisor.js.map +1 -0
  138. package/dist/commands/channel/text-body.d.ts +13 -0
  139. package/dist/commands/channel/text-body.d.ts.map +1 -0
  140. package/dist/commands/channel/text-body.js +47 -0
  141. package/dist/commands/channel/text-body.js.map +1 -0
  142. package/dist/commands/channel/threads.d.ts +39 -0
  143. package/dist/commands/channel/threads.d.ts.map +1 -0
  144. package/dist/commands/channel/threads.js +106 -0
  145. package/dist/commands/channel/threads.js.map +1 -0
  146. package/dist/commands/channel/title.d.ts +12 -0
  147. package/dist/commands/channel/title.d.ts.map +1 -0
  148. package/dist/commands/channel/title.js +24 -0
  149. package/dist/commands/channel/title.js.map +1 -0
  150. package/dist/commands/channel/wait.d.ts +17 -0
  151. package/dist/commands/channel/wait.d.ts.map +1 -0
  152. package/dist/commands/channel/wait.js +75 -0
  153. package/dist/commands/channel/wait.js.map +1 -0
  154. package/dist/commands/init.d.ts +2 -0
  155. package/dist/commands/init.d.ts.map +1 -1
  156. package/dist/commands/init.js +97 -42
  157. package/dist/commands/init.js.map +1 -1
  158. package/dist/commands/mem.d.ts +13 -117
  159. package/dist/commands/mem.d.ts.map +1 -1
  160. package/dist/commands/mem.js +168 -1074
  161. package/dist/commands/mem.js.map +1 -1
  162. package/dist/commands/uninstall.d.ts.map +1 -1
  163. package/dist/commands/uninstall.js +28 -2
  164. package/dist/commands/uninstall.js.map +1 -1
  165. package/dist/commands/update.d.ts.map +1 -1
  166. package/dist/commands/update.js +31 -111
  167. package/dist/commands/update.js.map +1 -1
  168. package/dist/commands/upgrade.d.ts +28 -0
  169. package/dist/commands/upgrade.d.ts.map +1 -0
  170. package/dist/commands/upgrade.js +84 -0
  171. package/dist/commands/upgrade.js.map +1 -0
  172. package/dist/commands/workflow.d.ts +35 -0
  173. package/dist/commands/workflow.d.ts.map +1 -0
  174. package/dist/commands/workflow.js +219 -0
  175. package/dist/commands/workflow.js.map +1 -0
  176. package/dist/configurators/claude.d.ts.map +1 -1
  177. package/dist/configurators/claude.js +1 -0
  178. package/dist/configurators/claude.js.map +1 -1
  179. package/dist/configurators/codex.d.ts.map +1 -1
  180. package/dist/configurators/codex.js +5 -3
  181. package/dist/configurators/codex.js.map +1 -1
  182. package/dist/configurators/shared.js +4 -4
  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 +3 -2
  187. package/dist/configurators/workflow.js.map +1 -1
  188. package/dist/migrations/manifests/0.5.10.json +9 -0
  189. package/dist/migrations/manifests/0.5.11.json +16 -0
  190. package/dist/migrations/manifests/0.5.12.json +9 -0
  191. package/dist/migrations/manifests/0.5.13.json +9 -0
  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.6.0-beta.10.json +9 -0
  198. package/dist/migrations/manifests/0.6.0-beta.11.json +9 -0
  199. package/dist/migrations/manifests/0.6.0-beta.12.json +9 -0
  200. package/dist/migrations/manifests/0.6.0-beta.13.json +9 -0
  201. package/dist/migrations/manifests/0.6.0-beta.14.json +9 -0
  202. package/dist/migrations/manifests/0.6.0-beta.15.json +9 -0
  203. package/dist/migrations/manifests/0.6.0-beta.16.json +9 -0
  204. package/dist/migrations/manifests/0.6.0-beta.17.json +9 -0
  205. package/dist/migrations/manifests/0.6.0-beta.18.json +16 -0
  206. package/dist/migrations/manifests/0.6.0-beta.19.json +9 -0
  207. package/dist/migrations/manifests/0.6.0-beta.20.json +9 -0
  208. package/dist/migrations/manifests/0.6.0-beta.3.json +9 -0
  209. package/dist/migrations/manifests/0.6.0-beta.4.json +9 -0
  210. package/dist/migrations/manifests/0.6.0-beta.5.json +9 -0
  211. package/dist/migrations/manifests/0.6.0-beta.6.json +16 -0
  212. package/dist/migrations/manifests/0.6.0-beta.7.json +9 -0
  213. package/dist/migrations/manifests/0.6.0-beta.8.json +9 -0
  214. package/dist/migrations/manifests/0.6.0-beta.9.json +9 -0
  215. package/dist/templates/claude/agents/trellis-check.md +13 -7
  216. package/dist/templates/claude/agents/trellis-implement.md +8 -7
  217. package/dist/templates/claude/settings.json +4 -4
  218. package/dist/templates/codebuddy/agents/trellis-check.md +13 -7
  219. package/dist/templates/codebuddy/agents/trellis-implement.md +8 -7
  220. package/dist/templates/codebuddy/settings.json +4 -4
  221. package/dist/templates/codex/agents/trellis-check.toml +4 -4
  222. package/dist/templates/codex/agents/trellis-implement.toml +4 -4
  223. package/dist/templates/codex/config.toml +5 -3
  224. package/dist/templates/codex/hooks/session-start.py +205 -119
  225. package/dist/templates/codex/hooks.json +2 -2
  226. package/dist/templates/codex/skills/before-dev/SKILL.md +12 -6
  227. package/dist/templates/codex/skills/brainstorm/SKILL.md +69 -457
  228. package/dist/templates/codex/skills/check/SKILL.md +86 -18
  229. package/dist/templates/codex/skills/start/SKILL.md +33 -323
  230. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-context-loading.md +7 -4
  231. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-spec-structure.md +1 -1
  232. package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-workflow.md +3 -2
  233. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/context-injection.md +5 -5
  234. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/spec-system.md +1 -1
  235. package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +35 -6
  236. package/dist/templates/common/bundled-skills/trellis-meta/references/platform-files/agents.md +5 -4
  237. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/SKILL.md +41 -0
  238. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/mcp-setup.md +90 -0
  239. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/repository-analysis.md +59 -0
  240. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-task-planning.md +61 -0
  241. package/dist/templates/common/bundled-skills/trellis-spec-bootstarp/references/spec-writing.md +70 -0
  242. package/dist/templates/common/commands/continue.md +6 -5
  243. package/dist/templates/common/commands/start.md +9 -6
  244. package/dist/templates/common/skills/before-dev.md +12 -6
  245. package/dist/templates/common/skills/brainstorm.md +68 -504
  246. package/dist/templates/common/skills/check.md +7 -1
  247. package/dist/templates/copilot/hooks/session-start.py +219 -101
  248. package/dist/templates/copilot/hooks.json +2 -2
  249. package/dist/templates/copilot/prompts/before-dev.prompt.md +12 -6
  250. package/dist/templates/copilot/prompts/brainstorm.prompt.md +69 -457
  251. package/dist/templates/copilot/prompts/check.prompt.md +86 -18
  252. package/dist/templates/copilot/prompts/parallel.prompt.md +16 -8
  253. package/dist/templates/copilot/prompts/start.prompt.md +33 -367
  254. package/dist/templates/cursor/agents/trellis-check.md +13 -7
  255. package/dist/templates/cursor/agents/trellis-implement.md +8 -7
  256. package/dist/templates/cursor/hooks.json +1 -7
  257. package/dist/templates/droid/droids/trellis-check.md +13 -7
  258. package/dist/templates/droid/droids/trellis-implement.md +8 -7
  259. package/dist/templates/droid/settings.json +4 -4
  260. package/dist/templates/gemini/agents/trellis-check.md +11 -5
  261. package/dist/templates/gemini/agents/trellis-implement.md +7 -6
  262. package/dist/templates/gemini/settings.json +2 -2
  263. package/dist/templates/kiro/agents/trellis-check.json +1 -1
  264. package/dist/templates/kiro/agents/trellis-implement.json +1 -1
  265. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +127 -9
  266. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +171 -6
  267. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +333 -43
  268. package/dist/templates/markdown/spec/guides/index.md.txt +18 -0
  269. package/dist/templates/opencode/agents/trellis-check.md +13 -7
  270. package/dist/templates/opencode/agents/trellis-implement.md +9 -8
  271. package/dist/templates/opencode/lib/session-utils.js +212 -123
  272. package/dist/templates/opencode/lib/trellis-context.js +73 -11
  273. package/dist/templates/opencode/plugins/inject-subagent-context.js +131 -29
  274. package/dist/templates/opencode/plugins/inject-workflow-state.js +9 -5
  275. package/dist/templates/opencode/plugins/session-start.js +9 -1
  276. package/dist/templates/pi/agents/trellis-check.md +5 -4
  277. package/dist/templates/pi/agents/trellis-implement.md +5 -4
  278. package/dist/templates/pi/extensions/trellis/index.ts.txt +1357 -754
  279. package/dist/templates/qoder/agents/trellis-check.md +11 -5
  280. package/dist/templates/qoder/agents/trellis-implement.md +7 -6
  281. package/dist/templates/qoder/settings.json +4 -4
  282. package/dist/templates/shared-hooks/index.d.ts.map +1 -1
  283. package/dist/templates/shared-hooks/index.js +0 -1
  284. package/dist/templates/shared-hooks/index.js.map +1 -1
  285. package/dist/templates/shared-hooks/inject-subagent-context.py +36 -14
  286. package/dist/templates/shared-hooks/inject-workflow-state.py +40 -42
  287. package/dist/templates/shared-hooks/session-start.py +222 -171
  288. package/dist/templates/trellis/config.yaml +38 -0
  289. package/dist/templates/trellis/index.d.ts +1 -0
  290. package/dist/templates/trellis/index.d.ts.map +1 -1
  291. package/dist/templates/trellis/index.js +2 -0
  292. package/dist/templates/trellis/index.js.map +1 -1
  293. package/dist/templates/trellis/scripts/add_session.py +50 -24
  294. package/dist/templates/trellis/scripts/common/config.py +57 -1
  295. package/dist/templates/trellis/scripts/common/safe_commit.py +285 -0
  296. package/dist/templates/trellis/scripts/common/session_context.py +384 -137
  297. package/dist/templates/trellis/scripts/common/task_context.py +3 -3
  298. package/dist/templates/trellis/scripts/common/task_store.py +161 -15
  299. package/dist/templates/trellis/scripts/common/workflow_phase.py +7 -10
  300. package/dist/templates/trellis/scripts/task.py +3 -3
  301. package/dist/templates/trellis/workflow.md +119 -98
  302. package/dist/utils/cwd-guard.d.ts +38 -0
  303. package/dist/utils/cwd-guard.d.ts.map +1 -0
  304. package/dist/utils/cwd-guard.js +62 -0
  305. package/dist/utils/cwd-guard.js.map +1 -0
  306. package/dist/utils/file-writer.d.ts +13 -0
  307. package/dist/utils/file-writer.d.ts.map +1 -1
  308. package/dist/utils/file-writer.js +59 -1
  309. package/dist/utils/file-writer.js.map +1 -1
  310. package/dist/utils/manifest-prune.d.ts +61 -0
  311. package/dist/utils/manifest-prune.d.ts.map +1 -0
  312. package/dist/utils/manifest-prune.js +136 -0
  313. package/dist/utils/manifest-prune.js.map +1 -0
  314. package/dist/utils/task-json.d.ts +9 -42
  315. package/dist/utils/task-json.d.ts.map +1 -1
  316. package/dist/utils/task-json.js +8 -45
  317. package/dist/utils/task-json.js.map +1 -1
  318. package/dist/utils/template-hash.d.ts +32 -6
  319. package/dist/utils/template-hash.d.ts.map +1 -1
  320. package/dist/utils/template-hash.js +53 -31
  321. package/dist/utils/template-hash.js.map +1 -1
  322. package/dist/utils/uninstall-scrubbers.d.ts +1 -0
  323. package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
  324. package/dist/utils/uninstall-scrubbers.js +21 -0
  325. package/dist/utils/uninstall-scrubbers.js.map +1 -1
  326. package/dist/utils/workflow-resolver.d.ts +86 -0
  327. package/dist/utils/workflow-resolver.d.ts.map +1 -0
  328. package/dist/utils/workflow-resolver.js +265 -0
  329. package/dist/utils/workflow-resolver.js.map +1 -0
  330. package/package.json +9 -8
@@ -20,14 +20,18 @@ You are already the `trellis-check` sub-agent that the main session dispatched.
20
20
 
21
21
  Before checking, read:
22
22
  - `.trellis/spec/` - Development guidelines
23
+ - Task `prd.md` - Requirements document
24
+ - Task `design.md` - Technical design (if exists)
25
+ - Task `implement.md` - Execution plan (if exists)
23
26
  - Pre-commit checklist for quality standards
24
27
 
25
28
  ## Core Responsibilities
26
29
 
27
30
  1. **Get code changes** - Use git diff to get uncommitted code
28
- 2. **Check against specs** - Verify code follows guidelines
29
- 3. **Self-fix** - Fix issues yourself, not just report them
30
- 4. **Run verification** - typecheck and lint
31
+ 2. **Review task artifacts** - Check changes against prd.md, design.md if present, and implement.md if present
32
+ 3. **Check against specs** - Verify code follows guidelines
33
+ 4. **Self-fix** - Fix issues yourself, not just report them
34
+ 5. **Run verification** - typecheck and lint
31
35
 
32
36
  ## Important
33
37
 
@@ -46,10 +50,12 @@ git diff --name-only # List changed files
46
50
  git diff # View specific changes
47
51
  ```
48
52
 
49
- ### Step 2: Check Against Specs
53
+ ### Step 2: Check Against Specs and Task Artifacts
50
54
 
51
- Read relevant specs in `.trellis/spec/` to check code:
55
+ 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:
52
56
 
57
+ - Does it satisfy the task requirements
58
+ - Does it follow the technical design and implementation plan when present
53
59
  - Does it follow directory structure conventions
54
60
  - Does it follow naming conventions
55
61
  - Does it follow code patterns
@@ -22,13 +22,14 @@ Before implementing, read:
22
22
  - `.trellis/workflow.md` - Project workflow
23
23
  - `.trellis/spec/` - Development guidelines
24
24
  - Task `prd.md` - Requirements document
25
- - Task `info.md` - Technical design (if exists)
25
+ - Task `design.md` - Technical design (if exists)
26
+ - Task `implement.md` - Execution plan (if exists)
26
27
 
27
28
  ## Core Responsibilities
28
29
 
29
30
  1. **Understand specs** - Read relevant spec files in `.trellis/spec/`
30
- 2. **Understand requirements** - Read prd.md and info.md
31
- 3. **Implement features** - Write code following specs and design
31
+ 2. **Understand task artifacts** - Read prd.md, design.md if present, and implement.md if present
32
+ 3. **Implement features** - Write code following specs and task artifacts
32
33
  4. **Self-check** - Ensure code quality
33
34
  5. **Report results** - Report completion status
34
35
 
@@ -53,15 +54,15 @@ Read relevant specs based on task type:
53
54
 
54
55
  ### 2. Understand Requirements
55
56
 
56
- Read the task's prd.md and info.md:
57
+ Read the task's prd.md, design.md if present, and implement.md if present:
57
58
 
58
59
  - What are the core requirements
59
60
  - Key points of technical design
60
- - Which files to modify/create
61
+ - Implementation order, validation commands, and rollback points
61
62
 
62
63
  ### 3. Implement Features
63
64
 
64
- - Write code following specs and technical design
65
+ - Write code following specs and task artifacts
65
66
  - Follow existing code patterns
66
67
  - Only do what's required, no over-engineering
67
68
 
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "type": "command",
9
9
  "command": "{{PYTHON_CMD}} .qoder/hooks/session-start.py",
10
- "timeout": 10
10
+ "timeout": 30
11
11
  }
12
12
  ]
13
13
  },
@@ -17,7 +17,7 @@
17
17
  {
18
18
  "type": "command",
19
19
  "command": "{{PYTHON_CMD}} .qoder/hooks/session-start.py",
20
- "timeout": 10
20
+ "timeout": 30
21
21
  }
22
22
  ]
23
23
  },
@@ -27,7 +27,7 @@
27
27
  {
28
28
  "type": "command",
29
29
  "command": "{{PYTHON_CMD}} .qoder/hooks/session-start.py",
30
- "timeout": 10
30
+ "timeout": 30
31
31
  }
32
32
  ]
33
33
  }
@@ -38,7 +38,7 @@
38
38
  {
39
39
  "type": "command",
40
40
  "command": "{{PYTHON_CMD}} .qoder/hooks/inject-workflow-state.py",
41
- "timeout": 5
41
+ "timeout": 15
42
42
  }
43
43
  ]
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,iCAAiC,GACjC,0BAA0B,GAC1B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,kBAAkB,EAClB,SAAS,cAAc,EAAE,CA4B1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAWnD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAGd"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAaH,MAAM,WAAW,UAAU;IACzB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GACtB,kBAAkB,GAClB,iCAAiC,GACjC,0BAA0B,GAC1B,4BAA4B,CAAC;AAEjC,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,OAAO,GACP,MAAM,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,kBAAkB,EAClB,SAAS,cAAc,EAAE,CA2B1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAWnD;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAGd"}
@@ -44,7 +44,6 @@ export const SHARED_HOOKS_BY_PLATFORM = {
44
44
  cursor: [
45
45
  "session-start.py",
46
46
  "inject-shell-session-context.py",
47
- "inject-workflow-state.py",
48
47
  "inject-subagent-context.py",
49
48
  ],
50
49
  codex: ["inject-workflow-state.py"],
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AA0BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAGjC;IACF,MAAM,EAAE;QACN,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,MAAM,EAAE;QACN,kBAAkB;QAClB,iCAAiC;QACjC,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,KAAK,EAAE,CAAC,0BAA0B,CAAC;IACnC,MAAM,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACxD,KAAK,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACvD,OAAO,EAAE,CAAC,0BAA0B,CAAC;IACrC,SAAS,EAAE;QACT,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,KAAK,EAAE;QACL,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,IAAI,EAAE,CAAC,4BAA4B,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAiB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChC,IAAI,EAAE,CAAC;IAEV,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAA4B;IAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAS,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,OAAO,oBAAoB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/templates/shared-hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC;AA0BD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAGjC;IACF,MAAM,EAAE;QACN,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,MAAM,EAAE;QACN,kBAAkB;QAClB,iCAAiC;QACjC,4BAA4B;KAC7B;IACD,KAAK,EAAE,CAAC,0BAA0B,CAAC;IACnC,MAAM,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACxD,KAAK,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;IACvD,OAAO,EAAE,CAAC,0BAA0B,CAAC;IACrC,SAAS,EAAE;QACT,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,KAAK,EAAE;QACL,kBAAkB;QAClB,0BAA0B;QAC1B,4BAA4B;KAC7B;IACD,IAAI,EAAE,CAAC,4BAA4B,CAAC;CACrC,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,OAAO,GAAiB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,WAAW,CAAC,SAAS,CAAC;SACjC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;SAChC,IAAI,EAAE,CAAC;IAEV,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAA4B;IAE5B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAS,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpE,OAAO,oBAAoB,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AACnE,CAAC"}
@@ -16,7 +16,8 @@ Context Source: Trellis active task resolver points to task directory
16
16
  - implement.jsonl - Implement agent dedicated context
17
17
  - check.jsonl - Check agent dedicated context
18
18
  - prd.md - Requirements document
19
- - info.md - Technical design
19
+ - design.md - Technical design for complex tasks
20
+ - implement.md - Execution plan for complex tasks
20
21
  - codex-review-output.txt - Code Review results
21
22
  """
22
23
  from __future__ import annotations
@@ -207,7 +208,7 @@ def read_jsonl_entries(base_path: str, jsonl_path: str) -> list[tuple[str, str]]
207
208
  if not os.path.exists(full_path):
208
209
  print(
209
210
  f"[inject-subagent-context] WARN: {jsonl_path} not found — "
210
- f"sub-agent will receive only prd.md",
211
+ f"sub-agent will receive only task artifacts",
211
212
  file=sys.stderr,
212
213
  )
213
214
  return []
@@ -248,7 +249,7 @@ def read_jsonl_entries(base_path: str, jsonl_path: str) -> list[tuple[str, str]]
248
249
  print(
249
250
  f"[inject-subagent-context] WARN: {jsonl_path} has no curated "
250
251
  f"entries (only seed / empty) — sub-agent will receive only "
251
- f"prd.md. See workflow.md Phase 1.3 for curation guidance.",
252
+ f"task artifacts. See workflow.md planning artifact guidance.",
252
253
  file=sys.stderr,
253
254
  )
254
255
 
@@ -276,9 +277,10 @@ def get_implement_context(repo_root: str, task_dir: str) -> str:
276
277
  Complete context for Implement Agent
277
278
 
278
279
  Read order:
279
- 1. All files in implement.jsonl (dev specs)
280
+ 1. All files in implement.jsonl (spec/research manifests)
280
281
  2. prd.md (requirements)
281
- 3. info.md (technical design)
282
+ 3. design.md if present (technical design)
283
+ 4. implement.md if present (execution plan)
282
284
  """
283
285
  context_parts = []
284
286
 
@@ -292,11 +294,18 @@ def get_implement_context(repo_root: str, task_dir: str) -> str:
292
294
  if prd_content:
293
295
  context_parts.append(f"=== {task_dir}/prd.md (Requirements) ===\n{prd_content}")
294
296
 
295
- # 3. Technical design
296
- info_content = read_file_content(repo_root, f"{task_dir}/info.md")
297
- if info_content:
297
+ # 3. Technical design for complex tasks
298
+ design_content = read_file_content(repo_root, f"{task_dir}/design.md")
299
+ if design_content:
298
300
  context_parts.append(
299
- f"=== {task_dir}/info.md (Technical Design) ===\n{info_content}"
301
+ f"=== {task_dir}/design.md (Technical Design) ===\n{design_content}"
302
+ )
303
+
304
+ # 4. Execution plan for complex tasks
305
+ implement_plan_content = read_file_content(repo_root, f"{task_dir}/implement.md")
306
+ if implement_plan_content:
307
+ context_parts.append(
308
+ f"=== {task_dir}/implement.md (Execution Plan) ===\n{implement_plan_content}"
300
309
  )
301
310
 
302
311
  return "\n\n".join(context_parts)
@@ -304,7 +313,7 @@ def get_implement_context(repo_root: str, task_dir: str) -> str:
304
313
 
305
314
  def get_check_context(repo_root: str, task_dir: str) -> str:
306
315
  """
307
- Context for Check Agent: check.jsonl + prd.md
316
+ Context for Check Agent: check.jsonl + task artifacts.
308
317
  """
309
318
  context_parts = []
310
319
 
@@ -315,6 +324,18 @@ def get_check_context(repo_root: str, task_dir: str) -> str:
315
324
  if prd_content:
316
325
  context_parts.append(f"=== {task_dir}/prd.md (Requirements) ===\n{prd_content}")
317
326
 
327
+ design_content = read_file_content(repo_root, f"{task_dir}/design.md")
328
+ if design_content:
329
+ context_parts.append(
330
+ f"=== {task_dir}/design.md (Technical Design) ===\n{design_content}"
331
+ )
332
+
333
+ implement_plan_content = read_file_content(repo_root, f"{task_dir}/implement.md")
334
+ if implement_plan_content:
335
+ context_parts.append(
336
+ f"=== {task_dir}/implement.md (Execution Plan) ===\n{implement_plan_content}"
337
+ )
338
+
318
339
  return "\n\n".join(context_parts)
319
340
 
320
341
 
@@ -351,8 +372,8 @@ All the information you need has been prepared for you:
351
372
  ## Workflow
352
373
 
353
374
  1. **Understand specs** - All dev specs are injected above, understand them
354
- 2. **Understand requirements** - Read requirements document and technical design
355
- 3. **Implement feature** - Implement following specs and design
375
+ 2. **Understand task artifacts** - Read requirements, technical design if present, and execution plan if present
376
+ 3. **Implement feature** - Implement following specs and task artifacts
356
377
  4. **Self-check** - Ensure code quality against check specs
357
378
 
358
379
  ## Important Constraints
@@ -421,7 +442,7 @@ Finish checklist and requirements:
421
442
  ## Workflow
422
443
 
423
444
  1. **Review changes** - Run `git diff --name-only` to see all changed files
424
- 2. **Verify requirements** - Check each requirement in prd.md is implemented
445
+ 2. **Verify task artifacts** - Check requirements in prd.md and, when present, design.md / implement.md
425
446
  3. **Spec sync** - Analyze whether changes introduce new patterns, contracts, or conventions
426
447
  - If new pattern/convention found: read target spec file → update it → update index.md if needed
427
448
  - If infra/cross-layer change: follow the 7-section mandatory template from update-spec.md
@@ -435,7 +456,8 @@ Finish checklist and requirements:
435
456
  - MUST read the target spec file BEFORE editing (avoid duplicating existing content)
436
457
  - Do NOT update specs for trivial changes (typos, formatting, obvious fixes)
437
458
  - If critical CODE issues found, report them clearly (fix specs, not code)
438
- - Verify all acceptance criteria in prd.md are met"""
459
+ - Verify all acceptance criteria in prd.md are met
460
+ - Verify design.md and implement.md constraints when those files are present"""
439
461
 
440
462
 
441
463
 
@@ -33,47 +33,36 @@ import os
33
33
  import re
34
34
  import sys
35
35
  from pathlib import Path
36
- from typing import Optional
37
-
38
-
39
- CODEX_SUB_AGENT_NOTICE = """<sub-agent-notice>
40
- SUB-AGENT NOTICE - READ FIRST IF SPAWNED VIA spawn_agent
41
36
 
42
- If your parent session spawned you via spawn_agent with an explicit task
43
- message above this hook output, that message is your only job.
44
- - Execute the parent message exactly as written, then return.
45
- - Ignore all Trellis workflow guidance below this notice.
46
- - Do NOT call task.py start, task.py add-context, or task.py archive.
47
- - Do NOT call wait_agent or spawn_agent.
48
- - Do NOT modify .trellis/tasks/* or any other file unless the parent message
49
- explicitly asks for that.
50
-
51
- If you are the main interactive Codex session and the user is typing at the
52
- terminal with no parent agent, use the workflow guidance below normally.
53
- </sub-agent-notice>"""
37
+ # Force UTF-8 on stdin/stdout/stderr on Windows. Default codepage there is
38
+ # cp936 / cp1252 / etc. non-ASCII content (Chinese task names, prd snippets)
39
+ # both in stdin (hook payload from host CLI) and stdout (our emitted blocks)
40
+ # raises UnicodeDecodeError / UnicodeEncodeError. Equivalent to `python -X utf8`
41
+ # but applied per-stream so we don't depend on host CLI's command wiring.
42
+ if sys.platform.startswith("win"):
43
+ import io as _io
44
+ for _stream_name in ("stdin", "stdout", "stderr"):
45
+ _stream = getattr(sys, _stream_name, None)
46
+ if _stream is None:
47
+ continue
48
+ if hasattr(_stream, "reconfigure"):
49
+ try:
50
+ _stream.reconfigure(encoding="utf-8", errors="replace") # type: ignore[union-attr]
51
+ except Exception:
52
+ pass
53
+ elif hasattr(_stream, "detach"):
54
+ try:
55
+ setattr(sys, _stream_name, _io.TextIOWrapper(_stream.detach(), encoding="utf-8", errors="replace"))
56
+ except Exception:
57
+ pass
58
+ from typing import Optional
54
59
 
55
60
 
56
- # Bootstrap notice for Codex while the session has no active task. Replaces the
57
- # heavyweight SessionStart context injection instead of pushing 9.5 KB of
58
- # workflow text up front, we just nudge the AI to read the `trellis-start` skill once.
59
- # The nudge keeps showing up while status == "no_task" (cheap text, AI won't
60
- # re-read after the first time). Once a task is created the breadcrumb status
61
- # flips and this notice stops appearing automatically. Sub-agents are warded
62
- # off by the <sub-agent-notice> above plus the explicit exemption below.
61
+ # Bootstrap notice for Codex while the session has no active task. Codex does not
62
+ # get the full SessionStart overview; this short reminder points the main session
63
+ # at the start skill once and leaves the per-turn state block compact.
63
64
  CODEX_NO_TASK_BOOTSTRAP_NOTICE = """<trellis-bootstrap>
64
- You are running in a Trellis-managed Codex session and there is no active task yet.
65
- If you have not already loaded Trellis context this session, read the `trellis-start` skill once:
66
-
67
- $trellis-start
68
-
69
- (equivalent to reading `.agents/skills/trellis-start/SKILL.md` and following its Steps 1-3)
70
-
71
- The skill walks you through workflow.md, dev profile, git status, active tasks, and spec
72
- indexes. Then route the user's request per the <workflow-state> A/B/C rules below.
73
-
74
- Sub-agent exemption: if you are a sub-agent (spawned via spawn_agent with a parent task
75
- message), DO NOT read `$trellis-start`. Execute the parent message directly as instructed by the
76
- <sub-agent-notice> above.
65
+ If you have not already loaded Trellis context this session, read the `trellis-start` skill once.
77
66
  </trellis-bootstrap>"""
78
67
 
79
68
 
@@ -245,7 +234,17 @@ def _codex_mode_banner(config: dict) -> str:
245
234
  cfg_mode = codex_cfg.get("dispatch_mode")
246
235
  if cfg_mode in ("inline", "sub-agent"):
247
236
  mode = cfg_mode
248
- return f"<codex-mode>{mode}</codex-mode>"
237
+ if mode == "sub-agent":
238
+ meaning = (
239
+ "sub-agent: implement/check work defaults to Trellis sub-agents; "
240
+ "the main session still coordinates, clarifies, updates specs, commits, and finishes."
241
+ )
242
+ else:
243
+ meaning = (
244
+ "inline: the main session implements/checks directly; "
245
+ "do not dispatch implement/check sub-agents."
246
+ )
247
+ return f"<codex-mode>{meaning}</codex-mode>"
249
248
 
250
249
 
251
250
  def resolve_breadcrumb_key(
@@ -294,8 +293,6 @@ def build_breadcrumb(
294
293
  if body is None:
295
294
  body = "Refer to workflow.md for current step."
296
295
  header = f"Status: {status}" if task_id is None else f"Task: {task_id} ({status})"
297
- if source:
298
- header = f"{header}\nSource: {source}"
299
296
  return f"<workflow-state>\n{header}\n{body}\n</workflow-state>"
300
297
 
301
298
 
@@ -333,11 +330,12 @@ def main() -> int:
333
330
  else:
334
331
  task_id, status, source = task
335
332
  status_key = resolve_breadcrumb_key(status, platform, config)
333
+ source_for_breadcrumb = None if platform == "codex" else source
336
334
  breadcrumb = build_breadcrumb(
337
- task_id, status, templates, source, breadcrumb_key=status_key
335
+ task_id, status, templates, source_for_breadcrumb, breadcrumb_key=status_key
338
336
  )
339
337
  if platform == "codex":
340
- parts: list[str] = [CODEX_SUB_AGENT_NOTICE]
338
+ parts: list[str] = []
341
339
  if task is None:
342
340
  parts.append(CODEX_NO_TASK_BOOTSTRAP_NOTICE)
343
341
  parts.append(_codex_mode_banner(config))