takt 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +78 -4
  2. package/dist/agents/runner.d.ts +3 -0
  3. package/dist/agents/runner.d.ts.map +1 -1
  4. package/dist/agents/runner.js +70 -14
  5. package/dist/agents/runner.js.map +1 -1
  6. package/dist/claude/client.d.ts +1 -1
  7. package/dist/claude/client.d.ts.map +1 -1
  8. package/dist/claude/client.js +4 -3
  9. package/dist/claude/client.js.map +1 -1
  10. package/dist/claude/index.d.ts +1 -1
  11. package/dist/claude/index.d.ts.map +1 -1
  12. package/dist/claude/index.js.map +1 -1
  13. package/dist/claude/process.d.ts +1 -1
  14. package/dist/claude/process.d.ts.map +1 -1
  15. package/dist/claude/process.js.map +1 -1
  16. package/dist/claude/types.d.ts +7 -0
  17. package/dist/claude/types.d.ts.map +1 -1
  18. package/dist/cli.d.ts +1 -0
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +10 -4
  21. package/dist/cli.js.map +1 -1
  22. package/dist/codex/client.d.ts +26 -0
  23. package/dist/codex/client.d.ts.map +1 -0
  24. package/dist/codex/client.js +418 -0
  25. package/dist/codex/client.js.map +1 -0
  26. package/dist/codex/index.d.ts +5 -0
  27. package/dist/codex/index.d.ts.map +1 -0
  28. package/dist/codex/index.js +5 -0
  29. package/dist/codex/index.js.map +1 -0
  30. package/dist/commands/config.d.ts +33 -0
  31. package/dist/commands/config.d.ts.map +1 -0
  32. package/dist/commands/config.js +110 -0
  33. package/dist/commands/config.js.map +1 -0
  34. package/dist/commands/index.d.ts +1 -0
  35. package/dist/commands/index.d.ts.map +1 -1
  36. package/dist/commands/index.js +1 -0
  37. package/dist/commands/index.js.map +1 -1
  38. package/dist/commands/workflow.js +1 -1
  39. package/dist/commands/workflow.js.map +1 -1
  40. package/dist/commands/workflowExecution.d.ts.map +1 -1
  41. package/dist/commands/workflowExecution.js +3 -1
  42. package/dist/commands/workflowExecution.js.map +1 -1
  43. package/dist/config/globalConfig.d.ts +2 -0
  44. package/dist/config/globalConfig.d.ts.map +1 -1
  45. package/dist/config/globalConfig.js +12 -0
  46. package/dist/config/globalConfig.js.map +1 -1
  47. package/dist/config/initialization.d.ts +10 -0
  48. package/dist/config/initialization.d.ts.map +1 -1
  49. package/dist/config/initialization.js +26 -4
  50. package/dist/config/initialization.js.map +1 -1
  51. package/dist/config/projectConfig.d.ts +14 -1
  52. package/dist/config/projectConfig.d.ts.map +1 -1
  53. package/dist/config/projectConfig.js +4 -0
  54. package/dist/config/projectConfig.js.map +1 -1
  55. package/dist/config/workflowLoader.d.ts.map +1 -1
  56. package/dist/config/workflowLoader.js +3 -0
  57. package/dist/config/workflowLoader.js.map +1 -1
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +2 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/models/schemas.d.ts +54 -3
  63. package/dist/models/schemas.d.ts.map +1 -1
  64. package/dist/models/schemas.js +34 -46
  65. package/dist/models/schemas.js.map +1 -1
  66. package/dist/models/types.d.ts +12 -2
  67. package/dist/models/types.d.ts.map +1 -1
  68. package/dist/{interactive/prompt.d.ts → prompt/index.d.ts} +3 -1
  69. package/dist/prompt/index.d.ts.map +1 -0
  70. package/dist/{interactive/prompt.js → prompt/index.js} +11 -1
  71. package/dist/prompt/index.js.map +1 -0
  72. package/dist/resources/index.d.ts +9 -0
  73. package/dist/resources/index.d.ts.map +1 -1
  74. package/dist/resources/index.js +21 -2
  75. package/dist/resources/index.js.map +1 -1
  76. package/dist/utils/session.d.ts +5 -0
  77. package/dist/utils/session.d.ts.map +1 -1
  78. package/dist/utils/session.js +19 -0
  79. package/dist/utils/session.js.map +1 -1
  80. package/dist/utils/ui.d.ts +7 -0
  81. package/dist/utils/ui.d.ts.map +1 -1
  82. package/dist/utils/ui.js +51 -0
  83. package/dist/utils/ui.js.map +1 -1
  84. package/dist/workflow/engine.d.ts +10 -0
  85. package/dist/workflow/engine.d.ts.map +1 -1
  86. package/dist/workflow/engine.js +31 -0
  87. package/dist/workflow/engine.js.map +1 -1
  88. package/dist/workflow/instruction-builder.d.ts +3 -0
  89. package/dist/workflow/instruction-builder.d.ts.map +1 -1
  90. package/dist/workflow/instruction-builder.js +5 -0
  91. package/dist/workflow/instruction-builder.js.map +1 -1
  92. package/dist/workflow/transitions.d.ts.map +1 -1
  93. package/dist/workflow/transitions.js +1 -0
  94. package/dist/workflow/transitions.js.map +1 -1
  95. package/package.json +3 -1
  96. package/resources/global/en/agents/default/ai-reviewer.md +136 -0
  97. package/resources/global/en/agents/default/architect.md +81 -30
  98. package/resources/global/en/agents/default/coder.md +60 -44
  99. package/resources/global/en/agents/default/planner.md +78 -0
  100. package/resources/global/en/agents/default/security.md +67 -75
  101. package/resources/global/en/agents/default/supervisor.md +94 -86
  102. package/resources/global/en/agents/expert-review/cqrs-es-reviewer.md +199 -0
  103. package/resources/global/en/agents/expert-review/frontend-reviewer.md +260 -0
  104. package/resources/global/en/agents/expert-review/qa-reviewer.md +260 -0
  105. package/resources/global/en/agents/expert-review/security-reviewer.md +222 -0
  106. package/resources/global/en/agents/expert-review/supervisor.md +186 -0
  107. package/resources/global/en/config.yaml +8 -0
  108. package/resources/global/en/workflows/default.yaml +474 -21
  109. package/resources/global/en/workflows/expert-review.yaml +936 -0
  110. package/resources/global/en/workflows/magi.yaml +18 -0
  111. package/resources/global/en/workflows/research.yaml +18 -0
  112. package/resources/global/ja/agents/default/ai-reviewer.md +136 -0
  113. package/resources/global/ja/agents/default/architect.md +81 -30
  114. package/resources/global/ja/agents/default/coder.md +21 -6
  115. package/resources/global/ja/agents/default/planner.md +78 -0
  116. package/resources/global/ja/agents/default/security.md +20 -28
  117. package/resources/global/ja/agents/default/supervisor.md +54 -46
  118. package/resources/global/ja/agents/expert-review/cqrs-es-reviewer.md +199 -0
  119. package/resources/global/ja/agents/expert-review/frontend-reviewer.md +260 -0
  120. package/resources/global/ja/agents/expert-review/qa-reviewer.md +260 -0
  121. package/resources/global/ja/agents/expert-review/security-reviewer.md +222 -0
  122. package/resources/global/ja/agents/expert-review/supervisor.md +186 -0
  123. package/resources/global/ja/config.yaml +8 -0
  124. package/resources/global/ja/workflows/default.yaml +485 -32
  125. package/resources/global/ja/workflows/expert-review.yaml +936 -0
  126. package/resources/global/ja/workflows/magi.yaml +18 -0
  127. package/resources/global/ja/workflows/research.yaml +18 -0
  128. package/dist/cli/agentExecution.d.ts +0 -16
  129. package/dist/cli/agentExecution.d.ts.map +0 -1
  130. package/dist/cli/agentExecution.js +0 -40
  131. package/dist/cli/agentExecution.js.map +0 -1
  132. package/dist/cli/help.d.ts +0 -8
  133. package/dist/cli/help.d.ts.map +0 -1
  134. package/dist/cli/help.js +0 -46
  135. package/dist/cli/help.js.map +0 -1
  136. package/dist/cli/index.d.ts +0 -8
  137. package/dist/cli/index.d.ts.map +0 -1
  138. package/dist/cli/index.js +0 -8
  139. package/dist/cli/index.js.map +0 -1
  140. package/dist/cli/taskBatch.d.ts +0 -8
  141. package/dist/cli/taskBatch.d.ts.map +0 -1
  142. package/dist/cli/taskBatch.js +0 -69
  143. package/dist/cli/taskBatch.js.map +0 -1
  144. package/dist/cli/workflowExecution.d.ts +0 -18
  145. package/dist/cli/workflowExecution.d.ts.map +0 -1
  146. package/dist/cli/workflowExecution.js +0 -112
  147. package/dist/cli/workflowExecution.js.map +0 -1
  148. package/dist/commands/agentExecution.d.ts +0 -8
  149. package/dist/commands/agentExecution.d.ts.map +0 -1
  150. package/dist/commands/agentExecution.js +0 -44
  151. package/dist/commands/agentExecution.js.map +0 -1
  152. package/dist/interactive/commands/agent.d.ts +0 -7
  153. package/dist/interactive/commands/agent.d.ts.map +0 -1
  154. package/dist/interactive/commands/agent.js +0 -65
  155. package/dist/interactive/commands/agent.js.map +0 -1
  156. package/dist/interactive/commands/basic.d.ts +0 -7
  157. package/dist/interactive/commands/basic.d.ts.map +0 -1
  158. package/dist/interactive/commands/basic.js +0 -81
  159. package/dist/interactive/commands/basic.js.map +0 -1
  160. package/dist/interactive/commands/index.d.ts +0 -12
  161. package/dist/interactive/commands/index.d.ts.map +0 -1
  162. package/dist/interactive/commands/index.js +0 -14
  163. package/dist/interactive/commands/index.js.map +0 -1
  164. package/dist/interactive/commands/registry.d.ts +0 -41
  165. package/dist/interactive/commands/registry.d.ts.map +0 -1
  166. package/dist/interactive/commands/registry.js +0 -37
  167. package/dist/interactive/commands/registry.js.map +0 -1
  168. package/dist/interactive/commands/session.d.ts +0 -7
  169. package/dist/interactive/commands/session.d.ts.map +0 -1
  170. package/dist/interactive/commands/session.js +0 -75
  171. package/dist/interactive/commands/session.js.map +0 -1
  172. package/dist/interactive/commands/task.d.ts +0 -7
  173. package/dist/interactive/commands/task.d.ts.map +0 -1
  174. package/dist/interactive/commands/task.js +0 -156
  175. package/dist/interactive/commands/task.js.map +0 -1
  176. package/dist/interactive/commands/workflow.d.ts +0 -7
  177. package/dist/interactive/commands/workflow.d.ts.map +0 -1
  178. package/dist/interactive/commands/workflow.js +0 -56
  179. package/dist/interactive/commands/workflow.js.map +0 -1
  180. package/dist/interactive/escape-tracker.d.ts +0 -37
  181. package/dist/interactive/escape-tracker.d.ts.map +0 -1
  182. package/dist/interactive/escape-tracker.js +0 -52
  183. package/dist/interactive/escape-tracker.js.map +0 -1
  184. package/dist/interactive/handlers.d.ts +0 -24
  185. package/dist/interactive/handlers.d.ts.map +0 -1
  186. package/dist/interactive/handlers.js +0 -191
  187. package/dist/interactive/handlers.js.map +0 -1
  188. package/dist/interactive/history-manager.d.ts +0 -45
  189. package/dist/interactive/history-manager.d.ts.map +0 -1
  190. package/dist/interactive/history-manager.js +0 -91
  191. package/dist/interactive/history-manager.js.map +0 -1
  192. package/dist/interactive/index.d.ts +0 -8
  193. package/dist/interactive/index.d.ts.map +0 -1
  194. package/dist/interactive/index.js +0 -8
  195. package/dist/interactive/index.js.map +0 -1
  196. package/dist/interactive/ink/components/App.d.ts +0 -16
  197. package/dist/interactive/ink/components/App.d.ts.map +0 -1
  198. package/dist/interactive/ink/components/App.js +0 -123
  199. package/dist/interactive/ink/components/App.js.map +0 -1
  200. package/dist/interactive/ink/components/AskUserQuestion.d.ts +0 -16
  201. package/dist/interactive/ink/components/AskUserQuestion.d.ts.map +0 -1
  202. package/dist/interactive/ink/components/AskUserQuestion.js +0 -139
  203. package/dist/interactive/ink/components/AskUserQuestion.js.map +0 -1
  204. package/dist/interactive/ink/components/Header.d.ts +0 -20
  205. package/dist/interactive/ink/components/Header.d.ts.map +0 -1
  206. package/dist/interactive/ink/components/Header.js +0 -7
  207. package/dist/interactive/ink/components/Header.js.map +0 -1
  208. package/dist/interactive/ink/components/HelpView.d.ts +0 -13
  209. package/dist/interactive/ink/components/HelpView.d.ts.map +0 -1
  210. package/dist/interactive/ink/components/HelpView.js +0 -45
  211. package/dist/interactive/ink/components/HelpView.js.map +0 -1
  212. package/dist/interactive/ink/components/IterationLimit.d.ts +0 -19
  213. package/dist/interactive/ink/components/IterationLimit.d.ts.map +0 -1
  214. package/dist/interactive/ink/components/IterationLimit.js +0 -59
  215. package/dist/interactive/ink/components/IterationLimit.js.map +0 -1
  216. package/dist/interactive/ink/components/ModalRouter.d.ts +0 -11
  217. package/dist/interactive/ink/components/ModalRouter.d.ts.map +0 -1
  218. package/dist/interactive/ink/components/ModalRouter.js +0 -71
  219. package/dist/interactive/ink/components/ModalRouter.js.map +0 -1
  220. package/dist/interactive/ink/components/PermissionPrompt.d.ts +0 -17
  221. package/dist/interactive/ink/components/PermissionPrompt.d.ts.map +0 -1
  222. package/dist/interactive/ink/components/PermissionPrompt.js +0 -102
  223. package/dist/interactive/ink/components/PermissionPrompt.js.map +0 -1
  224. package/dist/interactive/ink/components/PromptInput.d.ts +0 -26
  225. package/dist/interactive/ink/components/PromptInput.d.ts.map +0 -1
  226. package/dist/interactive/ink/components/PromptInput.js +0 -70
  227. package/dist/interactive/ink/components/PromptInput.js.map +0 -1
  228. package/dist/interactive/ink/components/Spinner.d.ts +0 -14
  229. package/dist/interactive/ink/components/Spinner.d.ts.map +0 -1
  230. package/dist/interactive/ink/components/Spinner.js +0 -8
  231. package/dist/interactive/ink/components/Spinner.js.map +0 -1
  232. package/dist/interactive/ink/components/StreamingOutput.d.ts +0 -25
  233. package/dist/interactive/ink/components/StreamingOutput.d.ts.map +0 -1
  234. package/dist/interactive/ink/components/StreamingOutput.js +0 -8
  235. package/dist/interactive/ink/components/StreamingOutput.js.map +0 -1
  236. package/dist/interactive/ink/components/UserInputPrompt.d.ts +0 -18
  237. package/dist/interactive/ink/components/UserInputPrompt.d.ts.map +0 -1
  238. package/dist/interactive/ink/components/UserInputPrompt.js +0 -30
  239. package/dist/interactive/ink/components/UserInputPrompt.js.map +0 -1
  240. package/dist/interactive/ink/components/WorkflowSelector.d.ts +0 -18
  241. package/dist/interactive/ink/components/WorkflowSelector.d.ts.map +0 -1
  242. package/dist/interactive/ink/components/WorkflowSelector.js +0 -65
  243. package/dist/interactive/ink/components/WorkflowSelector.js.map +0 -1
  244. package/dist/interactive/ink/constants.d.ts +0 -8
  245. package/dist/interactive/ink/constants.d.ts.map +0 -1
  246. package/dist/interactive/ink/constants.js +0 -8
  247. package/dist/interactive/ink/constants.js.map +0 -1
  248. package/dist/interactive/ink/context/AppContext.d.ts +0 -26
  249. package/dist/interactive/ink/context/AppContext.d.ts.map +0 -1
  250. package/dist/interactive/ink/context/AppContext.js +0 -30
  251. package/dist/interactive/ink/context/AppContext.js.map +0 -1
  252. package/dist/interactive/ink/context/appReducer.d.ts +0 -13
  253. package/dist/interactive/ink/context/appReducer.d.ts.map +0 -1
  254. package/dist/interactive/ink/context/appReducer.js +0 -183
  255. package/dist/interactive/ink/context/appReducer.js.map +0 -1
  256. package/dist/interactive/ink/context/types.d.ts +0 -144
  257. package/dist/interactive/ink/context/types.d.ts.map +0 -1
  258. package/dist/interactive/ink/context/types.js +0 -5
  259. package/dist/interactive/ink/context/types.js.map +0 -1
  260. package/dist/interactive/ink/hooks/keyDetection.d.ts +0 -116
  261. package/dist/interactive/ink/hooks/keyDetection.d.ts.map +0 -1
  262. package/dist/interactive/ink/hooks/keyDetection.js +0 -183
  263. package/dist/interactive/ink/hooks/keyDetection.js.map +0 -1
  264. package/dist/interactive/ink/hooks/multilineInputLogic.d.ts +0 -50
  265. package/dist/interactive/ink/hooks/multilineInputLogic.d.ts.map +0 -1
  266. package/dist/interactive/ink/hooks/multilineInputLogic.js +0 -150
  267. package/dist/interactive/ink/hooks/multilineInputLogic.js.map +0 -1
  268. package/dist/interactive/ink/hooks/useCommands.d.ts +0 -20
  269. package/dist/interactive/ink/hooks/useCommands.d.ts.map +0 -1
  270. package/dist/interactive/ink/hooks/useCommands.js +0 -129
  271. package/dist/interactive/ink/hooks/useCommands.js.map +0 -1
  272. package/dist/interactive/ink/hooks/useHistory.d.ts +0 -28
  273. package/dist/interactive/ink/hooks/useHistory.d.ts.map +0 -1
  274. package/dist/interactive/ink/hooks/useHistory.js +0 -59
  275. package/dist/interactive/ink/hooks/useHistory.js.map +0 -1
  276. package/dist/interactive/ink/hooks/useMultilineInput.d.ts +0 -49
  277. package/dist/interactive/ink/hooks/useMultilineInput.d.ts.map +0 -1
  278. package/dist/interactive/ink/hooks/useMultilineInput.js +0 -106
  279. package/dist/interactive/ink/hooks/useMultilineInput.js.map +0 -1
  280. package/dist/interactive/ink/hooks/usePermissionHandlers.d.ts +0 -16
  281. package/dist/interactive/ink/hooks/usePermissionHandlers.d.ts.map +0 -1
  282. package/dist/interactive/ink/hooks/usePermissionHandlers.js +0 -172
  283. package/dist/interactive/ink/hooks/usePermissionHandlers.js.map +0 -1
  284. package/dist/interactive/ink/hooks/useRawKeypress.d.ts +0 -41
  285. package/dist/interactive/ink/hooks/useRawKeypress.d.ts.map +0 -1
  286. package/dist/interactive/ink/hooks/useRawKeypress.js +0 -79
  287. package/dist/interactive/ink/hooks/useRawKeypress.js.map +0 -1
  288. package/dist/interactive/ink/hooks/useTaskQueue.d.ts +0 -32
  289. package/dist/interactive/ink/hooks/useTaskQueue.d.ts.map +0 -1
  290. package/dist/interactive/ink/hooks/useTaskQueue.js +0 -68
  291. package/dist/interactive/ink/hooks/useTaskQueue.js.map +0 -1
  292. package/dist/interactive/ink/hooks/useWorkflow.d.ts +0 -45
  293. package/dist/interactive/ink/hooks/useWorkflow.d.ts.map +0 -1
  294. package/dist/interactive/ink/hooks/useWorkflow.js +0 -93
  295. package/dist/interactive/ink/hooks/useWorkflow.js.map +0 -1
  296. package/dist/interactive/ink/hooks/useWorkflowExecution.d.ts +0 -14
  297. package/dist/interactive/ink/hooks/useWorkflowExecution.d.ts.map +0 -1
  298. package/dist/interactive/ink/hooks/useWorkflowExecution.js +0 -144
  299. package/dist/interactive/ink/hooks/useWorkflowExecution.js.map +0 -1
  300. package/dist/interactive/ink/index.d.ts +0 -30
  301. package/dist/interactive/ink/index.d.ts.map +0 -1
  302. package/dist/interactive/ink/index.js +0 -33
  303. package/dist/interactive/ink/index.js.map +0 -1
  304. package/dist/interactive/ink/utils/workflow.d.ts +0 -11
  305. package/dist/interactive/ink/utils/workflow.d.ts.map +0 -1
  306. package/dist/interactive/ink/utils/workflow.js +0 -19
  307. package/dist/interactive/ink/utils/workflow.js.map +0 -1
  308. package/dist/interactive/input-buffer.d.ts +0 -67
  309. package/dist/interactive/input-buffer.d.ts.map +0 -1
  310. package/dist/interactive/input-buffer.js +0 -162
  311. package/dist/interactive/input-buffer.js.map +0 -1
  312. package/dist/interactive/input-handlers.d.ts +0 -50
  313. package/dist/interactive/input-handlers.d.ts.map +0 -1
  314. package/dist/interactive/input-handlers.js +0 -170
  315. package/dist/interactive/input-handlers.js.map +0 -1
  316. package/dist/interactive/input.d.ts +0 -43
  317. package/dist/interactive/input.d.ts.map +0 -1
  318. package/dist/interactive/input.js +0 -74
  319. package/dist/interactive/input.js.map +0 -1
  320. package/dist/interactive/keyDetection.d.ts +0 -85
  321. package/dist/interactive/keyDetection.d.ts.map +0 -1
  322. package/dist/interactive/keyDetection.js +0 -167
  323. package/dist/interactive/keyDetection.js.map +0 -1
  324. package/dist/interactive/multilineInputLogic.d.ts +0 -30
  325. package/dist/interactive/multilineInputLogic.d.ts.map +0 -1
  326. package/dist/interactive/multilineInputLogic.js +0 -143
  327. package/dist/interactive/multilineInputLogic.js.map +0 -1
  328. package/dist/interactive/passthrough.d.ts +0 -30
  329. package/dist/interactive/passthrough.d.ts.map +0 -1
  330. package/dist/interactive/passthrough.js +0 -94
  331. package/dist/interactive/passthrough.js.map +0 -1
  332. package/dist/interactive/permission.d.ts +0 -33
  333. package/dist/interactive/permission.d.ts.map +0 -1
  334. package/dist/interactive/permission.js +0 -231
  335. package/dist/interactive/permission.js.map +0 -1
  336. package/dist/interactive/prompt.d.ts.map +0 -1
  337. package/dist/interactive/prompt.js.map +0 -1
  338. package/dist/interactive/repl.d.ts +0 -13
  339. package/dist/interactive/repl.d.ts.map +0 -1
  340. package/dist/interactive/repl.js +0 -202
  341. package/dist/interactive/repl.js.map +0 -1
  342. package/dist/interactive/types.d.ts +0 -35
  343. package/dist/interactive/types.d.ts.map +0 -1
  344. package/dist/interactive/types.js +0 -5
  345. package/dist/interactive/types.js.map +0 -1
  346. package/dist/interactive/ui.d.ts +0 -16
  347. package/dist/interactive/ui.d.ts.map +0 -1
  348. package/dist/interactive/ui.js +0 -122
  349. package/dist/interactive/ui.js.map +0 -1
  350. package/dist/interactive/user-input.d.ts +0 -26
  351. package/dist/interactive/user-input.d.ts.map +0 -1
  352. package/dist/interactive/user-input.js +0 -115
  353. package/dist/interactive/user-input.js.map +0 -1
  354. package/dist/interactive/workflow-executor.d.ts +0 -20
  355. package/dist/interactive/workflow-executor.d.ts.map +0 -1
  356. package/dist/interactive/workflow-executor.js +0 -200
  357. package/dist/interactive/workflow-executor.js.map +0 -1
@@ -0,0 +1,936 @@
1
+ # Expert Review Workflow
2
+ # Review workflow with CQRS+ES, Frontend, Security, and QA experts
3
+ #
4
+ # Flow:
5
+ # plan -> implement -> cqrs_es_review -> frontend_review -> ai_review -> security_review -> qa_review -> supervise -> COMPLETE
6
+ # ↓ ↓ ↓ ↓ ↓ ↓
7
+ # fix_cqrs_es fix_frontend ai_fix fix_security fix_qa fix_supervisor
8
+ #
9
+ # Fix destination is determined by Coder based on change impact:
10
+ # - fix_security: MINOR→security_review, MAJOR→cqrs_es_review
11
+ # - fix_qa: MINOR→qa_review, SECURITY→security_review, MAJOR→cqrs_es_review
12
+
13
+ name: expert-review
14
+ description: CQRS+ES, Frontend, Security, QA Expert Review
15
+
16
+ max_iterations: 20
17
+
18
+ initial_step: plan
19
+
20
+ steps:
21
+ # ===========================================
22
+ # Phase 0: Planning
23
+ # ===========================================
24
+ - name: plan
25
+ agent: ~/.takt/agents/default/planner.md
26
+ allowed_tools:
27
+ - Read
28
+ - Glob
29
+ - Grep
30
+ - Bash
31
+ - WebSearch
32
+ - WebFetch
33
+ instruction_template: |
34
+ ## Workflow Context
35
+ - Iteration: {iteration}/{max_iterations}
36
+ - Step: plan (Task Analysis)
37
+ - Report Directory: .takt/reports/{report_dir}/
38
+ - Report File: .takt/reports/{report_dir}/00-plan.md
39
+
40
+ ## User Request
41
+ {task}
42
+
43
+ ## Previous Response (when returned from implement)
44
+ {previous_response}
45
+
46
+ ## Instructions
47
+ Analyze the task and create an implementation plan.
48
+
49
+ **Note:** If returned from implement step (Previous Response exists),
50
+ review and revise the plan based on that feedback (replan).
51
+
52
+ **Tasks:**
53
+ 1. Understand the requirements
54
+ 2. Identify impact scope
55
+ 3. Decide implementation approach
56
+
57
+ **Report output:** Output to the `Report File` specified above.
58
+ - If file does not exist: Create new file
59
+ - If file exists: Append with `## Iteration {iteration}` section
60
+
61
+ **Report format:**
62
+ ```markdown
63
+ # Task Plan
64
+
65
+ ## Original Request
66
+ {User's request as-is}
67
+
68
+ ## Analysis Results
69
+
70
+ ### Objective
71
+ {What needs to be achieved}
72
+
73
+ ### Scope
74
+ {Impact scope}
75
+
76
+ ### Implementation Approach
77
+ {How to proceed}
78
+
79
+ ## Clarifications Needed (if any)
80
+ - {Unclear points or items requiring confirmation}
81
+ ```
82
+
83
+ Output [PLANNER:DONE] when complete.
84
+ Output [PLANNER:BLOCKED] if requirements are unclear.
85
+ pass_previous_response: true
86
+ transitions:
87
+ - condition: done
88
+ next_step: implement
89
+ - condition: blocked
90
+ next_step: ABORT
91
+
92
+ # ===========================================
93
+ # Phase 1: Implementation
94
+ # ===========================================
95
+ - name: implement
96
+ agent: ~/.takt/agents/default/coder.md
97
+ allowed_tools:
98
+ - Read
99
+ - Glob
100
+ - Grep
101
+ - Edit
102
+ - Write
103
+ - Bash
104
+ - WebSearch
105
+ - WebFetch
106
+ instruction_template: |
107
+ ## Workflow Context
108
+ - Iteration: {iteration}/{max_iterations}
109
+ - Step: implement
110
+ - Report Directory: .takt/reports/{report_dir}/
111
+ - Report Files:
112
+ - Scope: .takt/reports/{report_dir}/01-coder-scope.md
113
+ - Decisions: .takt/reports/{report_dir}/02-coder-decisions.md
114
+
115
+ ## User Request
116
+ {task}
117
+
118
+ ## Additional User Inputs
119
+ {user_inputs}
120
+
121
+ ## Instructions
122
+ Follow the plan from the plan step and implement.
123
+ Refer to the plan report (00-plan.md) and proceed with implementation.
124
+
125
+ **Report output:** Output to the `Report Files` specified above.
126
+ - If file does not exist: Create new file
127
+ - If file exists: Append with `## Iteration {iteration}` section
128
+
129
+ **Scope report format (create at implementation start):**
130
+ ```markdown
131
+ # Change Scope Declaration
132
+
133
+ ## Task
134
+ {One-line task summary}
135
+
136
+ ## Planned Changes
137
+ | Type | File |
138
+ |------|------|
139
+ | Create | `src/example.ts` |
140
+ | Modify | `src/routes.ts` |
141
+
142
+ ## Estimated Size
143
+ Small / Medium / Large
144
+
145
+ ## Impact Scope
146
+ - {Affected modules or features}
147
+ ```
148
+
149
+ **Decisions report format (on completion, only if decisions were made):**
150
+ ```markdown
151
+ # Decision Log
152
+
153
+ ## 1. {Decision Content}
154
+ - **Background**: {Why the decision was needed}
155
+ - **Options Considered**: {List of options}
156
+ - **Reason**: {Why this option was chosen}
157
+ ```
158
+
159
+ Include [CODER:DONE] when complete.
160
+ Include [CODER:BLOCKED] if you cannot proceed (returns to plan).
161
+ transitions:
162
+ - condition: done
163
+ next_step: cqrs_es_review
164
+ - condition: blocked
165
+ next_step: plan
166
+
167
+ # ===========================================
168
+ # Phase 2: CQRS+ES Review
169
+ # ===========================================
170
+ - name: cqrs_es_review
171
+ agent: ~/.takt/agents/expert-review/cqrs-es-reviewer.md
172
+ allowed_tools:
173
+ - Read
174
+ - Glob
175
+ - Grep
176
+ - WebSearch
177
+ - WebFetch
178
+ instruction_template: |
179
+ ## Workflow Context
180
+ - Iteration: {iteration}/{max_iterations}
181
+ - Step: cqrs_es_review (CQRS+ES Expert Review)
182
+ - Report Directory: .takt/reports/{report_dir}/
183
+ - Report File: .takt/reports/{report_dir}/03-cqrs-es-review.md
184
+
185
+ ## Original User Request
186
+ {task}
187
+
188
+ ## Git Diff
189
+ ```diff
190
+ {git_diff}
191
+ ```
192
+
193
+ ## Instructions
194
+ Review the changes above from the CQRS (Command Query Responsibility Segregation)
195
+ and Event Sourcing perspective.
196
+
197
+ **Review Criteria:**
198
+ - Aggregate design validity
199
+ - Event design (granularity, naming, schema)
200
+ - Command/Query separation
201
+ - Projection design
202
+ - Eventual consistency considerations
203
+
204
+ **Note**: If this project does not use CQRS+ES patterns,
205
+ review from a general domain design perspective.
206
+
207
+ **Report output:** Output to the `Report File` specified above.
208
+ - If file does not exist: Create new file
209
+ - If file exists: Append with `## Iteration {iteration}` section
210
+
211
+ **Report format:**
212
+ ```markdown
213
+ # CQRS+ES Review
214
+
215
+ ## Result: APPROVE / REJECT
216
+
217
+ ## Summary
218
+ {1-2 sentences summarizing result}
219
+
220
+ ## Reviewed Perspectives
221
+ | Perspective | Result | Notes |
222
+ |-------------|--------|-------|
223
+ | Aggregate Design | ✅ | - |
224
+ | Event Design | ✅ | - |
225
+ | Command/Query Separation | ✅ | - |
226
+ | Projections | ✅ | - |
227
+ | Eventual Consistency | ✅ | - |
228
+
229
+ ## Issues (if REJECT)
230
+ | # | Location | Issue | Fix |
231
+ |---|----------|-------|-----|
232
+ | 1 | `src/file.ts:42` | Issue description | Fix method |
233
+ ```
234
+
235
+ Include:
236
+ - [CQRS-ES:APPROVE] if CQRS+ES design is sound
237
+ - [CQRS-ES:REJECT] if design issues found (list specific issues)
238
+ transitions:
239
+ - condition: approved
240
+ next_step: frontend_review
241
+ - condition: rejected
242
+ next_step: fix_cqrs_es
243
+
244
+ - name: fix_cqrs_es
245
+ agent: ~/.takt/agents/default/coder.md
246
+ allowed_tools:
247
+ - Read
248
+ - Glob
249
+ - Grep
250
+ - Edit
251
+ - Write
252
+ - Bash
253
+ - WebSearch
254
+ - WebFetch
255
+ instruction_template: |
256
+ ## Workflow Context
257
+ - Iteration: {iteration}/{max_iterations}
258
+ - Step: fix_cqrs_es
259
+
260
+ ## CQRS+ES Review Feedback (This is the latest instruction - prioritize this)
261
+ {previous_response}
262
+
263
+ ## Original User Request (Initial request - for reference)
264
+ {task}
265
+
266
+ ## Additional User Inputs
267
+ {user_inputs}
268
+
269
+ ## Instructions
270
+ **Important**: Fix the issues pointed out by the CQRS+ES expert.
271
+
272
+ Areas of concern:
273
+ - Aggregate design
274
+ - Event design
275
+ - Command/Query separation
276
+ - Projections
277
+ - Eventual consistency
278
+
279
+ Include [CODER:DONE] when complete.
280
+ Include [CODER:BLOCKED] if unable to proceed.
281
+ pass_previous_response: true
282
+ transitions:
283
+ - condition: done
284
+ next_step: cqrs_es_review
285
+ - condition: blocked
286
+ next_step: plan
287
+
288
+ # ===========================================
289
+ # Phase 3: Frontend Review
290
+ # ===========================================
291
+ - name: frontend_review
292
+ agent: ~/.takt/agents/expert-review/frontend-reviewer.md
293
+ allowed_tools:
294
+ - Read
295
+ - Glob
296
+ - Grep
297
+ - WebSearch
298
+ - WebFetch
299
+ instruction_template: |
300
+ ## Workflow Context
301
+ - Iteration: {iteration}/{max_iterations}
302
+ - Step: frontend_review (Frontend Expert Review)
303
+ - Report Directory: .takt/reports/{report_dir}/
304
+ - Report File: .takt/reports/{report_dir}/04-frontend-review.md
305
+
306
+ ## Original User Request
307
+ {task}
308
+
309
+ ## Git Diff
310
+ ```diff
311
+ {git_diff}
312
+ ```
313
+
314
+ ## Instructions
315
+ Review the changes above from the frontend development perspective.
316
+
317
+ **Review Criteria:**
318
+ - Component design (separation of concerns, granularity)
319
+ - State management (local/global decisions)
320
+ - Performance (re-rendering, memoization)
321
+ - Accessibility (keyboard support, ARIA)
322
+ - Data fetching patterns
323
+ - TypeScript type safety
324
+
325
+ **Note**: If this project does not include frontend code,
326
+ output [FRONTEND:APPROVE] and proceed.
327
+
328
+ **Report output:** Output to the `Report File` specified above.
329
+ - If file does not exist: Create new file
330
+ - If file exists: Append with `## Iteration {iteration}` section
331
+
332
+ **Report format:**
333
+ ```markdown
334
+ # Frontend Review
335
+
336
+ ## Result: APPROVE / REJECT
337
+
338
+ ## Summary
339
+ {1-2 sentences summarizing result}
340
+
341
+ ## Reviewed Perspectives
342
+ | Perspective | Result | Notes |
343
+ |-------------|--------|-------|
344
+ | Component Design | ✅ | - |
345
+ | State Management | ✅ | - |
346
+ | Performance | ✅ | - |
347
+ | Accessibility | ✅ | - |
348
+ | Type Safety | ✅ | - |
349
+
350
+ ## Issues (if REJECT)
351
+ | # | Location | Issue | Fix |
352
+ |---|----------|-------|-----|
353
+ | 1 | `src/file.tsx:42` | Issue description | Fix method |
354
+ ```
355
+
356
+ Include:
357
+ - [FRONTEND:APPROVE] if frontend design is sound
358
+ - [FRONTEND:REJECT] if design issues found (list specific issues)
359
+ transitions:
360
+ - condition: approved
361
+ next_step: ai_review
362
+ - condition: rejected
363
+ next_step: fix_frontend
364
+
365
+ - name: fix_frontend
366
+ agent: ~/.takt/agents/default/coder.md
367
+ allowed_tools:
368
+ - Read
369
+ - Glob
370
+ - Grep
371
+ - Edit
372
+ - Write
373
+ - Bash
374
+ - WebSearch
375
+ - WebFetch
376
+ instruction_template: |
377
+ ## Workflow Context
378
+ - Iteration: {iteration}/{max_iterations}
379
+ - Step: fix_frontend
380
+
381
+ ## Frontend Review Feedback (This is the latest instruction - prioritize this)
382
+ {previous_response}
383
+
384
+ ## Original User Request (Initial request - for reference)
385
+ {task}
386
+
387
+ ## Additional User Inputs
388
+ {user_inputs}
389
+
390
+ ## Instructions
391
+ **Important**: Fix the issues pointed out by the frontend expert.
392
+
393
+ Areas of concern:
394
+ - Component design
395
+ - State management
396
+ - Performance
397
+ - Accessibility
398
+ - Type safety
399
+
400
+ Include [CODER:DONE] when complete.
401
+ Include [CODER:BLOCKED] if unable to proceed.
402
+ pass_previous_response: true
403
+ transitions:
404
+ - condition: done
405
+ next_step: frontend_review
406
+ - condition: blocked
407
+ next_step: plan
408
+
409
+ # ===========================================
410
+ # Phase 4: AI Review
411
+ # ===========================================
412
+ - name: ai_review
413
+ agent: ~/.takt/agents/default/ai-reviewer.md
414
+ allowed_tools:
415
+ - Read
416
+ - Glob
417
+ - Grep
418
+ - WebSearch
419
+ - WebFetch
420
+ instruction_template: |
421
+ ## Workflow Context
422
+ - Iteration: {iteration}/{max_iterations}
423
+ - Step: ai_review (AI-Generated Code Review)
424
+ - Report Directory: .takt/reports/{report_dir}/
425
+ - Report File: .takt/reports/{report_dir}/05-ai-review.md
426
+
427
+ ## Original User Request (Initial request from workflow start)
428
+ {task}
429
+
430
+ ## Git Diff
431
+ ```diff
432
+ {git_diff}
433
+ ```
434
+
435
+ ## Instructions
436
+ Review the code for AI-specific issues:
437
+ - Assumption validation
438
+ - Plausible but wrong patterns
439
+ - Context fit with existing codebase
440
+ - Scope creep detection
441
+
442
+ **Report output:** Output to the `Report File` specified above.
443
+ - If file does not exist: Create new file
444
+ - If file exists: Append with `## Iteration {iteration}` section
445
+
446
+ **Report format:**
447
+ ```markdown
448
+ # AI-Generated Code Review
449
+
450
+ ## Result: APPROVE / REJECT
451
+
452
+ ## Summary
453
+ {One sentence summarizing result}
454
+
455
+ ## Verified Items
456
+ | Aspect | Result | Notes |
457
+ |--------|--------|-------|
458
+ | Assumption validity | ✅ | - |
459
+ | API/Library existence | ✅ | - |
460
+ | Context fit | ✅ | - |
461
+ | Scope | ✅ | - |
462
+
463
+ ## Issues (if REJECT)
464
+ | # | Category | Location | Issue |
465
+ |---|----------|----------|-------|
466
+ | 1 | Hallucinated API | `src/file.ts:23` | Non-existent method |
467
+ ```
468
+
469
+ **Cognitive load reduction rules:**
470
+ - No issues → Summary 1 line + check table only (10 lines or less)
471
+ - Issues found → + Issues in table format (25 lines or less)
472
+
473
+ Include:
474
+ - [AI_REVIEW:APPROVE] if no AI-specific issues found
475
+ - [AI_REVIEW:REJECT] if issues detected (list specific problems)
476
+ transitions:
477
+ - condition: approved
478
+ next_step: security_review
479
+ - condition: rejected
480
+ next_step: ai_fix
481
+
482
+ - name: ai_fix
483
+ agent: ~/.takt/agents/default/coder.md
484
+ allowed_tools:
485
+ - Read
486
+ - Glob
487
+ - Grep
488
+ - Edit
489
+ - Write
490
+ - Bash
491
+ - WebSearch
492
+ - WebFetch
493
+ instruction_template: |
494
+ ## Workflow Context
495
+ - Iteration: {iteration}/{max_iterations}
496
+ - Step: ai_fix
497
+
498
+ ## AI Review Feedback (This is the latest instruction - prioritize this)
499
+ {previous_response}
500
+
501
+ ## Original User Request (Initial request from workflow start - for reference)
502
+ {task}
503
+
504
+ ## Additional User Inputs
505
+ {user_inputs}
506
+
507
+ ## Instructions
508
+ **Important**: Address the AI Reviewer's feedback.
509
+ Focus on:
510
+ - Correcting incorrect assumptions
511
+ - Fixing plausible-but-wrong implementations
512
+ - Aligning with existing codebase patterns
513
+ - Removing scope creep
514
+
515
+ Include [CODER:DONE] when complete.
516
+ Include [CODER:BLOCKED] if unable to proceed.
517
+ pass_previous_response: true
518
+ transitions:
519
+ - condition: done
520
+ next_step: cqrs_es_review
521
+ - condition: blocked
522
+ next_step: plan
523
+
524
+ # ===========================================
525
+ # Phase 5: Security Review
526
+ # ===========================================
527
+ - name: security_review
528
+ agent: ~/.takt/agents/expert-review/security-reviewer.md
529
+ allowed_tools:
530
+ - Read
531
+ - Glob
532
+ - Grep
533
+ - WebSearch
534
+ - WebFetch
535
+ instruction_template: |
536
+ ## Workflow Context
537
+ - Iteration: {iteration}/{max_iterations}
538
+ - Step: security_review (Security Expert Review)
539
+ - Report Directory: .takt/reports/{report_dir}/
540
+ - Report File: .takt/reports/{report_dir}/06-security-review.md
541
+
542
+ ## Original User Request
543
+ {task}
544
+
545
+ ## Git Diff
546
+ ```diff
547
+ {git_diff}
548
+ ```
549
+
550
+ ## Instructions
551
+ Review the changes above from the security perspective.
552
+
553
+ **Review Criteria:**
554
+ - Injection attacks (SQL, command, XSS)
555
+ - Authentication/authorization flaws
556
+ - Sensitive information handling
557
+ - Encryption appropriateness
558
+ - OWASP Top 10
559
+
560
+ **Report output:** Output to the `Report File` specified above.
561
+ - If file does not exist: Create new file
562
+ - If file exists: Append with `## Iteration {iteration}` section
563
+
564
+ **Report format:**
565
+ ```markdown
566
+ # Security Review
567
+
568
+ ## Result: APPROVE / REJECT
569
+
570
+ ## Severity: None / Low / Medium / High / Critical
571
+
572
+ ## Check Results
573
+ | Category | Result | Notes |
574
+ |----------|--------|-------|
575
+ | Injection | ✅ | - |
576
+ | Auth/Authz | ✅ | - |
577
+ | Data Protection | ✅ | - |
578
+ | Dependencies | ✅ | - |
579
+
580
+ ## Vulnerabilities (if REJECT)
581
+ | # | Severity | Type | Location | Fix |
582
+ |---|----------|------|----------|-----|
583
+ | 1 | High | SQLi | `src/db.ts:42` | Use parameterized query |
584
+
585
+ ## Warnings (non-blocking)
586
+ - {Security recommendations}
587
+ ```
588
+
589
+ Include:
590
+ - [SECURITY:APPROVE] if no security issues found
591
+ - [SECURITY:REJECT] if vulnerabilities found (list specific issues with severity)
592
+ transitions:
593
+ - condition: approved
594
+ next_step: qa_review
595
+ - condition: rejected
596
+ next_step: fix_security
597
+
598
+ - name: fix_security
599
+ agent: ~/.takt/agents/default/coder.md
600
+ allowed_tools:
601
+ - Read
602
+ - Glob
603
+ - Grep
604
+ - Edit
605
+ - Write
606
+ - Bash
607
+ - WebSearch
608
+ - WebFetch
609
+ instruction_template: |
610
+ ## Workflow Context
611
+ - Iteration: {iteration}/{max_iterations}
612
+ - Step: fix_security
613
+
614
+ ## Security Review Feedback (This is the latest instruction - prioritize this)
615
+ {previous_response}
616
+
617
+ ## Original User Request (Initial request - for reference)
618
+ {task}
619
+
620
+ ## Additional User Inputs
621
+ {user_inputs}
622
+
623
+ ## Instructions
624
+ **Important**: Fix the issues pointed out by the security expert.
625
+ Security issues should be addressed with highest priority.
626
+
627
+ Areas of concern:
628
+ - Injection vulnerabilities
629
+ - Authentication/authorization flaws
630
+ - Sensitive information exposure
631
+ - Encryption issues
632
+
633
+ ## Completion: Determine Change Impact
634
+ When fix is complete, judge the **impact scope of changes** and output the appropriate tag:
635
+
636
+ - `[CODER:DONE]` - Minor fix (re-run security review only)
637
+ - Examples: Add validation, add escaping, configuration changes
638
+ - `[CODER:REJECT]` - Major fix (restart from CQRS+ES review)
639
+ - Examples: Data flow changes, API design changes, auth method changes, domain model changes
640
+
641
+ Include [CODER:BLOCKED] if unable to proceed.
642
+ pass_previous_response: true
643
+ transitions:
644
+ - condition: done
645
+ next_step: security_review
646
+ - condition: rejected
647
+ next_step: cqrs_es_review
648
+ - condition: blocked
649
+ next_step: plan
650
+
651
+ # ===========================================
652
+ # Phase 6: QA Review
653
+ # ===========================================
654
+ - name: qa_review
655
+ agent: ~/.takt/agents/expert-review/qa-reviewer.md
656
+ allowed_tools:
657
+ - Read
658
+ - Glob
659
+ - Grep
660
+ - WebSearch
661
+ - WebFetch
662
+ instruction_template: |
663
+ ## Workflow Context
664
+ - Iteration: {iteration}/{max_iterations}
665
+ - Step: qa_review (QA Expert Review)
666
+ - Report Directory: .takt/reports/{report_dir}/
667
+ - Report File: .takt/reports/{report_dir}/07-qa-review.md
668
+
669
+ ## Original User Request
670
+ {task}
671
+
672
+ ## Git Diff
673
+ ```diff
674
+ {git_diff}
675
+ ```
676
+
677
+ ## Instructions
678
+ Review the changes above from the quality assurance perspective.
679
+
680
+ **Review Criteria:**
681
+ - Test coverage and quality
682
+ - Test strategy (unit/integration/E2E)
683
+ - Documentation (in-code and external)
684
+ - Error handling
685
+ - Logging and monitoring
686
+ - Maintainability
687
+
688
+ **Report output:** Output to the `Report File` specified above.
689
+ - If file does not exist: Create new file
690
+ - If file exists: Append with `## Iteration {iteration}` section
691
+
692
+ **Report format:**
693
+ ```markdown
694
+ # QA Review
695
+
696
+ ## Result: APPROVE / REJECT
697
+
698
+ ## Summary
699
+ {1-2 sentences summarizing result}
700
+
701
+ ## Reviewed Perspectives
702
+ | Perspective | Result | Notes |
703
+ |-------------|--------|-------|
704
+ | Test Coverage | ✅ | - |
705
+ | Test Quality | ✅ | - |
706
+ | Error Handling | ✅ | - |
707
+ | Documentation | ✅ | - |
708
+ | Maintainability | ✅ | - |
709
+
710
+ ## Issues (if REJECT)
711
+ | # | Category | Issue | Fix |
712
+ |---|----------|-------|-----|
713
+ | 1 | Testing | Issue description | Fix method |
714
+ ```
715
+
716
+ Include:
717
+ - [QA:APPROVE] if quality standards are met
718
+ - [QA:REJECT] if quality issues found (list specific issues)
719
+ transitions:
720
+ - condition: approved
721
+ next_step: supervise
722
+ - condition: rejected
723
+ next_step: fix_qa
724
+
725
+ - name: fix_qa
726
+ agent: ~/.takt/agents/default/coder.md
727
+ allowed_tools:
728
+ - Read
729
+ - Glob
730
+ - Grep
731
+ - Edit
732
+ - Write
733
+ - Bash
734
+ - WebSearch
735
+ - WebFetch
736
+ instruction_template: |
737
+ ## Workflow Context
738
+ - Iteration: {iteration}/{max_iterations}
739
+ - Step: fix_qa
740
+
741
+ ## QA Review Feedback (This is the latest instruction - prioritize this)
742
+ {previous_response}
743
+
744
+ ## Original User Request (Initial request - for reference)
745
+ {task}
746
+
747
+ ## Additional User Inputs
748
+ {user_inputs}
749
+
750
+ ## Instructions
751
+ **Important**: Fix the issues pointed out by the QA expert.
752
+
753
+ Areas of concern:
754
+ - Adding/improving tests
755
+ - Adding/fixing documentation
756
+ - Error handling
757
+ - Log output
758
+ - Code quality
759
+
760
+ ## Completion: Determine Change Impact
761
+ When fix is complete, judge the **impact scope of changes** and output the appropriate tag:
762
+
763
+ - `[CODER:DONE]` - Minor fix (re-run QA review only)
764
+ - Examples: Add tests, add documentation, add logs, add comments
765
+ - `[CODER:IMPROVE]` - Security-impacting fix (restart from security review)
766
+ - Examples: Error handling changes (error message content changes), input validation changes
767
+ - `[CODER:REJECT]` - Major fix (restart from CQRS+ES review)
768
+ - Examples: Business logic changes, data model changes, API changes
769
+
770
+ Include [CODER:BLOCKED] if unable to proceed.
771
+ pass_previous_response: true
772
+ transitions:
773
+ - condition: done
774
+ next_step: qa_review
775
+ - condition: improve
776
+ next_step: security_review
777
+ - condition: rejected
778
+ next_step: cqrs_es_review
779
+ - condition: blocked
780
+ next_step: plan
781
+
782
+ # ===========================================
783
+ # Phase 7: Supervision
784
+ # ===========================================
785
+ - name: supervise
786
+ agent: ~/.takt/agents/expert-review/supervisor.md
787
+ allowed_tools:
788
+ - Read
789
+ - Glob
790
+ - Grep
791
+ - WebSearch
792
+ - WebFetch
793
+ instruction_template: |
794
+ ## Workflow Context
795
+ - Iteration: {iteration}/{max_iterations}
796
+ - Step: supervise (Final Review)
797
+ - Report Directory: .takt/reports/{report_dir}/
798
+ - Report Files:
799
+ - Validation: .takt/reports/{report_dir}/08-supervisor-validation.md
800
+ - Summary: .takt/reports/{report_dir}/summary.md
801
+
802
+ ## Original User Request
803
+ {task}
804
+
805
+ ## Git Diff
806
+ ```diff
807
+ {git_diff}
808
+ ```
809
+
810
+ ## Previous Reviews Summary
811
+ Reaching this step means all the following reviews have been APPROVED:
812
+ - CQRS+ES Review: APPROVED
813
+ - Frontend Review: APPROVED
814
+ - AI Review: APPROVED
815
+ - Security Review: APPROVED
816
+ - QA Review: APPROVED
817
+
818
+ ## Instructions
819
+ Run tests, verify the build, and perform final approval.
820
+
821
+ **Workflow Overall Review:**
822
+ 1. Does the implementation match the plan (00-plan.md)?
823
+ 2. Were all review step issues addressed?
824
+ 3. Was the original task objective achieved?
825
+
826
+ **Review Reports:** Read all reports in Report Directory and
827
+ check for any unaddressed improvement suggestions.
828
+
829
+ **Report output:** Output to the `Report Files` specified above.
830
+ - If file does not exist: Create new file
831
+ - If file exists: Append with `## Iteration {iteration}` section
832
+
833
+ **Validation report format:**
834
+ ```markdown
835
+ # Final Validation Results
836
+
837
+ ## Result: APPROVE / REJECT
838
+
839
+ ## Validation Summary
840
+ | Item | Status | Verification Method |
841
+ |------|--------|---------------------|
842
+ | Requirements met | ✅ | Matched against requirements list |
843
+ | Tests | ✅ | `npm test` (N passed) |
844
+ | Build | ✅ | `npm run build` succeeded |
845
+ | Functional check | ✅ | Main flows verified |
846
+
847
+ ## Deliverables
848
+ - Created: {Created files}
849
+ - Modified: {Modified files}
850
+
851
+ ## Incomplete Items (if REJECT)
852
+ | # | Item | Reason |
853
+ |---|------|--------|
854
+ | 1 | {Item} | {Reason} |
855
+ ```
856
+
857
+ **Summary report format (only if APPROVE):**
858
+ ```markdown
859
+ # Task Completion Summary
860
+
861
+ ## Task
862
+ {Original request in 1-2 sentences}
863
+
864
+ ## Result
865
+ ✅ Complete
866
+
867
+ ## Changes
868
+ | Type | File | Summary |
869
+ |------|------|---------|
870
+ | Create | `src/file.ts` | Summary description |
871
+
872
+ ## Review Results
873
+ | Review | Result |
874
+ |--------|--------|
875
+ | CQRS+ES | ✅ APPROVE |
876
+ | Frontend | ✅ APPROVE |
877
+ | AI Review | ✅ APPROVE |
878
+ | Security | ✅ APPROVE |
879
+ | QA | ✅ APPROVE |
880
+ | Supervisor | ✅ APPROVE |
881
+
882
+ ## Verification Commands
883
+ ```bash
884
+ npm test
885
+ npm run build
886
+ ```
887
+ ```
888
+
889
+ Output:
890
+ - [SUPERVISOR:APPROVE] if ready to merge
891
+ - [SUPERVISOR:REJECT] if issues found (specify the issues)
892
+ transitions:
893
+ - condition: approved
894
+ next_step: COMPLETE
895
+ - condition: rejected
896
+ next_step: fix_supervisor
897
+
898
+ - name: fix_supervisor
899
+ agent: ~/.takt/agents/default/coder.md
900
+ allowed_tools:
901
+ - Read
902
+ - Glob
903
+ - Grep
904
+ - Edit
905
+ - Write
906
+ - Bash
907
+ - WebSearch
908
+ - WebFetch
909
+ instruction_template: |
910
+ ## Workflow Context
911
+ - Iteration: {iteration}/{max_iterations}
912
+ - Step: fix_supervisor
913
+
914
+ ## Supervisor Feedback (This is the latest instruction - prioritize this)
915
+ {previous_response}
916
+
917
+ ## Original User Request (Initial request - for reference)
918
+ {task}
919
+
920
+ ## Additional User Inputs
921
+ {user_inputs}
922
+
923
+ ## Instructions
924
+ **Important**: Fix the issues pointed out by the supervisor.
925
+
926
+ The supervisor has identified issues from a big-picture perspective.
927
+ Address items in priority order.
928
+
929
+ Include [CODER:DONE] when complete.
930
+ Include [CODER:BLOCKED] if unable to proceed.
931
+ pass_previous_response: true
932
+ transitions:
933
+ - condition: done
934
+ next_step: supervise
935
+ - condition: blocked
936
+ next_step: plan