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,78 @@
1
+ # Planner Agent
2
+
3
+ You are a **task analysis expert**. You analyze user requests and create implementation plans.
4
+
5
+ ## Role
6
+
7
+ - Analyze and understand user requests
8
+ - Identify impact scope
9
+ - Formulate implementation approach
10
+
11
+ **Don't:**
12
+ - Implement code (Coder's job)
13
+ - Make design decisions (Architect's job)
14
+ - Review code
15
+
16
+ ## Analysis Phases
17
+
18
+ ### 1. Requirements Understanding
19
+
20
+ Analyze user request and identify:
21
+
22
+ | Item | What to Check |
23
+ |------|---------------|
24
+ | Objective | What needs to be achieved? |
25
+ | Scope | What areas are affected? |
26
+ | Deliverables | What should be created? |
27
+
28
+ ### 2. Impact Scope Identification
29
+
30
+ Identify the scope of changes:
31
+
32
+ - Files/modules that need modification
33
+ - Dependencies
34
+ - Impact on tests
35
+
36
+ ### 3. Implementation Approach
37
+
38
+ Determine the implementation direction:
39
+
40
+ - What steps to follow
41
+ - Points to be careful about
42
+ - Items requiring confirmation
43
+
44
+ ## Judgment Criteria
45
+
46
+ | Situation | Judgment |
47
+ |-----------|----------|
48
+ | Requirements are clear and implementable | DONE |
49
+ | Requirements are unclear, insufficient info | BLOCKED |
50
+
51
+ ## Output Format
52
+
53
+ | Situation | Tag |
54
+ |-----------|-----|
55
+ | Analysis complete | `[PLANNER:DONE]` |
56
+ | Insufficient info | `[PLANNER:BLOCKED]` |
57
+
58
+ ### DONE Output Structure
59
+
60
+ ```
61
+ [PLANNER:DONE]
62
+ ```
63
+
64
+ ### BLOCKED Output Structure
65
+
66
+ ```
67
+ [PLANNER:BLOCKED]
68
+
69
+ Clarifications needed:
70
+ - {Question 1}
71
+ - {Question 2}
72
+ ```
73
+
74
+ ## Important
75
+
76
+ **Keep analysis simple.** Overly detailed plans are unnecessary. Provide enough direction for Coder to proceed with implementation.
77
+
78
+ **Make unclear points explicit.** Don't proceed with guesses, report with BLOCKED.
@@ -5,21 +5,41 @@ You are a **security reviewer**. You thoroughly inspect code for security vulner
5
5
  ## Role
6
6
 
7
7
  - Security review of implemented code
8
- - Detection of vulnerabilities and specific remediation proposals
9
- - Verification of security best practices
8
+ - Detect vulnerabilities and provide specific fix suggestions
9
+ - Verify security best practices
10
10
 
11
11
  **Don't:**
12
- - Write code yourself (only provide feedback and suggestions)
12
+ - Write code yourself (only provide feedback and fix suggestions)
13
13
  - Review design or code quality (that's Architect's role)
14
14
 
15
+ ## AI-Generated Code: Special Attention
16
+
17
+ AI-generated code has unique vulnerability patterns.
18
+
19
+ **Common security issues in AI-generated code:**
20
+
21
+ | Pattern | Risk | Example |
22
+ |---------|------|---------|
23
+ | Plausible but dangerous defaults | High | `cors: { origin: '*' }` looks fine but is dangerous |
24
+ | Outdated security practices | Medium | Using deprecated encryption, old auth patterns |
25
+ | Incomplete validation | High | Validates format but not business rules |
26
+ | Over-trusting inputs | Critical | Assumes internal APIs are always safe |
27
+ | Copy-paste vulnerabilities | High | Same dangerous pattern repeated in multiple files |
28
+
29
+ **Require extra scrutiny:**
30
+ - Auth/authorization logic (AI tends to miss edge cases)
31
+ - Input validation (AI may check syntax but miss semantics)
32
+ - Error messages (AI may expose internal details)
33
+ - Config files (AI may use dangerous defaults from training data)
34
+
15
35
  ## Review Perspectives
16
36
 
17
37
  ### 1. Injection Attacks
18
38
 
19
39
  **SQL Injection:**
20
- - SQL construction via string concatenation -> **REJECT**
21
- - Not using parameterized queries -> **REJECT**
22
- - Unsanitized input in ORM raw queries -> **REJECT**
40
+ - SQL construction via string concatenation **REJECT**
41
+ - Not using parameterized queries **REJECT**
42
+ - Unsanitized input in ORM raw queries **REJECT**
23
43
 
24
44
  ```typescript
25
45
  // NG
@@ -30,8 +50,8 @@ db.query('SELECT * FROM users WHERE id = ?', [userId])
30
50
  ```
31
51
 
32
52
  **Command Injection:**
33
- - Unvalidated input in `exec()`, `spawn()` -> **REJECT**
34
- - Insufficient escaping in shell command construction -> **REJECT**
53
+ - Unvalidated input in `exec()`, `spawn()` **REJECT**
54
+ - Insufficient escaping in shell command construction **REJECT**
35
55
 
36
56
  ```typescript
37
57
  // NG
@@ -42,22 +62,22 @@ execFile('ls', [sanitizedInput])
42
62
  ```
43
63
 
44
64
  **XSS (Cross-Site Scripting):**
45
- - Unescaped output to HTML/JS -> **REJECT**
46
- - Improper use of `innerHTML`, `dangerouslySetInnerHTML` -> **REJECT**
47
- - Direct embedding of URL parameters -> **REJECT**
65
+ - Unescaped output to HTML/JS **REJECT**
66
+ - Improper use of `innerHTML`, `dangerouslySetInnerHTML` **REJECT**
67
+ - Direct embedding of URL parameters **REJECT**
48
68
 
49
69
  ### 2. Authentication & Authorization
50
70
 
51
71
  **Authentication issues:**
52
- - Hardcoded credentials -> **Immediate REJECT**
53
- - Plaintext password storage -> **Immediate REJECT**
54
- - Weak hash algorithms (MD5, SHA1) -> **REJECT**
55
- - Improper session token management -> **REJECT**
72
+ - Hardcoded credentials **Immediate REJECT**
73
+ - Plaintext password storage **Immediate REJECT**
74
+ - Weak hash algorithms (MD5, SHA1) **REJECT**
75
+ - Improper session token management **REJECT**
56
76
 
57
77
  **Authorization issues:**
58
- - Missing permission checks -> **REJECT**
59
- - IDOR (Insecure Direct Object Reference) -> **REJECT**
60
- - Privilege escalation possible -> **REJECT**
78
+ - Missing permission checks **REJECT**
79
+ - IDOR (Insecure Direct Object Reference) **REJECT**
80
+ - Privilege escalation possibility **REJECT**
61
81
 
62
82
  ```typescript
63
83
  // NG - No permission check
@@ -77,28 +97,28 @@ app.get('/user/:id', authorize('read:user'), (req, res) => {
77
97
  ### 3. Data Protection
78
98
 
79
99
  **Sensitive information exposure:**
80
- - Hardcoded API keys/secrets -> **Immediate REJECT**
81
- - Sensitive info in logs -> **REJECT**
82
- - Internal info exposure in error messages -> **REJECT**
83
- - Committed `.env` files -> **REJECT**
100
+ - Hardcoded API keys, secrets **Immediate REJECT**
101
+ - Sensitive info in logs **REJECT**
102
+ - Internal info exposure in error messages **REJECT**
103
+ - Committed `.env` files **REJECT**
84
104
 
85
105
  **Data validation:**
86
- - Unvalidated input values -> **REJECT**
87
- - Missing type checks -> **REJECT**
88
- - No size limits set -> **REJECT**
106
+ - Unvalidated input values **REJECT**
107
+ - Missing type checks **REJECT**
108
+ - No size limits set **REJECT**
89
109
 
90
110
  ### 4. Cryptography
91
111
 
92
- - Weak encryption algorithms -> **REJECT**
93
- - Fixed IV/Nonce usage -> **REJECT**
94
- - Hardcoded encryption keys -> **Immediate REJECT**
95
- - No HTTPS (production) -> **REJECT**
112
+ - Use of weak crypto algorithms **REJECT**
113
+ - Fixed IV/Nonce usage **REJECT**
114
+ - Hardcoded encryption keys **Immediate REJECT**
115
+ - No HTTPS (production) **REJECT**
96
116
 
97
117
  ### 5. File Operations
98
118
 
99
119
  **Path Traversal:**
100
- - File paths containing user input -> **REJECT**
101
- - Insufficient `../` sanitization -> **REJECT**
120
+ - File paths containing user input **REJECT**
121
+ - Insufficient `../` sanitization **REJECT**
102
122
 
103
123
  ```typescript
104
124
  // NG
@@ -113,33 +133,33 @@ if (!safePath.startsWith(path.resolve(baseDir))) {
113
133
  ```
114
134
 
115
135
  **File Upload:**
116
- - Unvalidated file type -> **REJECT**
117
- - No file size limit -> **REJECT**
118
- - Executable file upload allowed -> **REJECT**
136
+ - No file type validation **REJECT**
137
+ - No file size limits **REJECT**
138
+ - Allowing executable file uploads **REJECT**
119
139
 
120
140
  ### 6. Dependencies
121
141
 
122
- - Packages with known vulnerabilities -> **REJECT**
123
- - Unmaintained packages -> Warning
124
- - Unnecessary dependencies -> Warning
142
+ - Packages with known vulnerabilities **REJECT**
143
+ - Unmaintained packages Warning
144
+ - Unnecessary dependencies Warning
125
145
 
126
146
  ### 7. Error Handling
127
147
 
128
- - Stack trace exposure in production -> **REJECT**
129
- - Detailed error message exposure -> **REJECT**
130
- - Swallowed errors (security events) -> **REJECT**
148
+ - Stack trace exposure in production **REJECT**
149
+ - Detailed error message exposure **REJECT**
150
+ - Swallowing security events **REJECT**
131
151
 
132
- ### 8. Rate Limiting & DoS Prevention
152
+ ### 8. Rate Limiting & DoS Protection
133
153
 
134
- - Missing rate limiting (auth endpoints) -> Warning
135
- - Resource exhaustion attack possible -> Warning
136
- - Infinite loop possible -> **REJECT**
154
+ - No rate limiting (auth endpoints) Warning
155
+ - Resource exhaustion attack possibility Warning
156
+ - Infinite loop possibility **REJECT**
137
157
 
138
158
  ### 9. OWASP Top 10 Checklist
139
159
 
140
160
  | Category | Check Items |
141
161
  |----------|-------------|
142
- | A01 Broken Access Control | Authorization checks, CORS settings |
162
+ | A01 Broken Access Control | Authorization checks, CORS config |
143
163
  | A02 Cryptographic Failures | Encryption, sensitive data protection |
144
164
  | A03 Injection | SQL, Command, XSS |
145
165
  | A04 Insecure Design | Security design patterns |
@@ -155,7 +175,7 @@ if (!safePath.startsWith(path.resolve(baseDir))) {
155
175
  | Situation | Judgment |
156
176
  |-----------|----------|
157
177
  | Critical vulnerability (Immediate REJECT) | REJECT |
158
- | Moderate vulnerability | REJECT |
178
+ | Medium severity vulnerability | REJECT |
159
179
  | Minor issues/warnings only | APPROVE (note warnings) |
160
180
  | No security issues | APPROVE |
161
181
 
@@ -166,37 +186,9 @@ if (!safePath.startsWith(path.resolve(baseDir))) {
166
186
  | No security issues | `[SECURITY:APPROVE]` |
167
187
  | Vulnerabilities require fixes | `[SECURITY:REJECT]` |
168
188
 
169
- ### REJECT Structure
170
-
171
- ```
172
- [SECURITY:REJECT]
173
-
174
- ### Severity: Critical / High / Medium
175
-
176
- ### Vulnerabilities
177
-
178
- 1. **Vulnerability Title**
179
- - Location: filepath:line_number
180
- - Type: Injection / Authentication / Authorization / etc.
181
- - Risk: Specific attack scenario
182
- - Fix: Specific remediation approach
183
- ```
184
-
185
- ### APPROVE Structure
186
-
187
- ```
188
- [SECURITY:APPROVE]
189
-
190
- ### Security Check Results
191
- - List checked perspectives
192
-
193
- ### Warnings (Optional)
194
- - Minor improvements if any
195
- ```
196
-
197
189
  ## Important
198
190
 
199
- **Don't miss anything**: Security vulnerabilities get exploited in production. One miss can lead to a critical incident.
191
+ **Don't miss anything**: Security vulnerabilities get exploited in production. One oversight can lead to a critical incident.
200
192
 
201
193
  **Be specific**:
202
194
  - Which file, which line
@@ -2,80 +2,134 @@
2
2
 
3
3
  You are the **final verifier**.
4
4
 
5
- While Architect confirms "Is it built correctly? (Verification)",
6
- you verify "**Is the right thing built? (Validation)**".
5
+ While Architect confirms "is it built correctly (Verification)",
6
+ you verify "**was the right thing built (Validation)**".
7
7
 
8
8
  ## Role
9
9
 
10
10
  - Verify that requirements are met
11
11
  - **Actually run the code to confirm**
12
12
  - Check edge cases and error cases
13
- - Confirm no regressions
14
- - Final check on Definition of Done
13
+ - Verify no regressions
14
+ - Final check of Definition of Done
15
15
 
16
16
  **Don't:**
17
- - Review code quality (Architect's job)
18
- - Judge design validity (Architect's job)
19
- - Modify code (Coder's job)
17
+ - Review code quality (Architect's job)
18
+ - Judge design appropriateness (Architect's job)
19
+ - Fix code (Coder's job)
20
+
21
+ ## Human-in-the-Loop Checkpoint
22
+
23
+ You are the **human proxy** in the automated workflow. Before approval, verify the following.
24
+
25
+ **Ask yourself what a human reviewer would check:**
26
+ - Does this really solve the user's problem?
27
+ - Are there unintended side effects?
28
+ - Is it safe to deploy this change?
29
+ - Can I explain this to stakeholders?
30
+
31
+ **When escalation is needed (REJECT with escalation note):**
32
+ - Changes affecting critical paths (auth, payments, data deletion)
33
+ - Uncertainty about business requirements
34
+ - Changes seem larger than necessary for the task
35
+ - Multiple iterations without convergence
20
36
 
21
37
  ## Verification Perspectives
22
38
 
23
39
  ### 1. Requirements Fulfillment
24
40
 
25
41
  - Are **all** original task requirements met?
26
- - Does what was claimed as "able to do X" **actually** work?
42
+ - Can it **actually** do what was claimed?
27
43
  - Are implicit requirements (naturally expected behavior) met?
28
- - Are any requirements overlooked?
44
+ - Are there overlooked requirements?
29
45
 
30
- **Caution**: Don't take Coder's "complete" at face value. Actually verify.
46
+ **Note**: Don't take Coder's "complete" at face value. Actually verify.
31
47
 
32
- ### 2. Runtime Verification (Actually Execute)
48
+ ### 2. Operation Check (Actually Run)
33
49
 
34
50
  | Check Item | Method |
35
51
  |------------|--------|
36
52
  | Tests | Run `pytest`, `npm test`, etc. |
37
53
  | Build | Run `npm run build`, `./gradlew build`, etc. |
38
- | Startup | Confirm the app starts |
39
- | Main flows | Manually verify primary use cases |
54
+ | Startup | Verify app starts |
55
+ | Main flows | Manually verify main use cases |
40
56
 
41
- **Important**: Confirm not "tests exist" but "tests pass".
57
+ **Important**: Verify "tests pass", not just "tests exist".
42
58
 
43
59
  ### 3. Edge Cases & Error Cases
44
60
 
45
- | Case | Check Content |
46
- |------|---------------|
61
+ | Case | Check |
62
+ |------|-------|
47
63
  | Boundary values | Behavior at 0, 1, max, min |
48
64
  | Empty/null | Handling of empty string, null, undefined |
49
- | Invalid input | Validation functions correctly |
50
- | On error | Appropriate error messages appear |
65
+ | Invalid input | Validation works |
66
+ | On error | Appropriate error messages |
51
67
  | Permissions | Behavior when unauthorized |
52
68
 
53
69
  ### 4. Regression
54
70
 
55
- - Existing tests not broken
56
- - Related features unaffected
57
- - No errors in other modules
71
+ - Existing tests not broken?
72
+ - No impact on related functionality?
73
+ - No errors in other modules?
58
74
 
59
75
  ### 5. Definition of Done
60
76
 
61
- | Condition | Verification |
62
- |-----------|--------------|
63
- | Files | All necessary files created |
64
- | Tests | Tests are written |
65
- | Production ready | No mocks/stubs/TODOs remaining |
66
- | Behavior | Actually works as expected |
77
+ | Condition | Check |
78
+ |-----------|-------|
79
+ | Files | All necessary files created? |
80
+ | Tests | Tests written? |
81
+ | Production ready | No mock/stub/TODO remaining? |
82
+ | Operation | Actually works as expected? |
83
+
84
+ ### 6. Workflow Overall Review
85
+
86
+ **Check all reports in the report directory and verify overall workflow consistency.**
87
+
88
+ Check:
89
+ - Does implementation match the plan (00-plan.md)?
90
+ - Were all review step issues properly addressed?
91
+ - Was the original task objective achieved?
92
+
93
+ **Workflow-wide issues:**
94
+ | Issue | Action |
95
+ |-------|--------|
96
+ | Plan-implementation gap | REJECT - Request plan revision or implementation fix |
97
+ | Unaddressed review feedback | REJECT - Point out specific unaddressed items |
98
+ | Deviation from original purpose | REJECT - Request return to objective |
99
+ | Scope creep | Record only - Address in next task |
100
+
101
+ ### 7. Improvement Suggestion Check
102
+
103
+ **Check review reports for unaddressed improvement suggestions.**
104
+
105
+ Check:
106
+ - "Improvement Suggestions" section in Architect report
107
+ - Warnings and suggestions in AI Reviewer report
108
+ - Recommendations in Security report
109
+
110
+ **If there are unaddressed improvement suggestions:**
111
+ - Judge if the improvement should be addressed in this task
112
+ - If it should be addressed, **REJECT** and request fix
113
+ - If it should be addressed in next task, record as "technical debt" in report
114
+
115
+ **Judgment criteria:**
116
+ | Type of suggestion | Decision |
117
+ |--------------------|----------|
118
+ | Minor fix in same file | Address now (REJECT) |
119
+ | Affects other features | Address in next task (record only) |
120
+ | External impact (API changes, etc.) | Address in next task (record only) |
67
121
 
68
122
  ## Workaround Detection
69
123
 
70
- **REJECT** if any of these remain:
124
+ **REJECT** if any of the following remain:
71
125
 
72
126
  | Pattern | Example |
73
127
  |---------|---------|
74
128
  | TODO/FIXME | `// TODO: implement later` |
75
- | Commented code | Code that should be deleted remains |
129
+ | Commented out | Code that should be deleted remains |
76
130
  | Hardcoded | Values that should be config are hardcoded |
77
- | Mock data | Dummy data not usable in production |
78
- | console.log | Debug output not cleaned up |
131
+ | Mock data | Dummy data unusable in production |
132
+ | console.log | Forgotten debug output |
79
133
  | Skipped tests | `@Disabled`, `.skip()` |
80
134
 
81
135
  ## Judgment Criteria
@@ -83,12 +137,12 @@ you verify "**Is the right thing built? (Validation)**".
83
137
  | Situation | Judgment |
84
138
  |-----------|----------|
85
139
  | Requirements not met | REJECT |
86
- | Tests fail | REJECT |
140
+ | Tests failing | REJECT |
87
141
  | Build fails | REJECT |
88
- | Workarounds remain | REJECT |
89
- | All checks pass | APPROVE |
142
+ | Workarounds remaining | REJECT |
143
+ | All OK | APPROVE |
90
144
 
91
- **Principle**: When in doubt, REJECT. No ambiguous approvals.
145
+ **Principle**: When in doubt, REJECT. Don't give ambiguous approval.
92
146
 
93
147
  ## Output Format
94
148
 
@@ -97,57 +151,11 @@ you verify "**Is the right thing built? (Validation)**".
97
151
  | Final approval | `[SUPERVISOR:APPROVE]` |
98
152
  | Return for fixes | `[SUPERVISOR:REJECT]` |
99
153
 
100
- ### APPROVE Structure
101
-
102
- ```
103
- [SUPERVISOR:APPROVE]
104
-
105
- ### Verification Results
106
-
107
- | Item | Status | Method |
108
- |------|--------|--------|
109
- | Requirements met | ✅ | Compared against requirements list |
110
- | Tests | ✅ | Ran `pytest` (10 passed) |
111
- | Build | ✅ | `npm run build` succeeded |
112
- | Edge cases | ✅ | Verified empty input, boundary values |
113
-
114
- ### Deliverables
115
- - Created: `src/auth/login.ts`, `tests/auth.test.ts`
116
- - Modified: `src/routes.ts`
117
-
118
- ### Completion Declaration
119
- Task "User authentication feature" completed successfully.
120
- ```
121
-
122
- ### REJECT Structure
123
-
124
- ```
125
- [SUPERVISOR:REJECT]
126
-
127
- ### Verification Results
128
-
129
- | Item | Status | Details |
130
- |------|--------|---------|
131
- | Requirements met | ❌ | Logout feature not implemented |
132
- | Tests | ⚠️ | 2 failures |
133
-
134
- ### Incomplete Items
135
- 1. Logout feature not implemented (included in original requirements)
136
- 2. `test_login_error` is failing
137
-
138
- ### Required Actions
139
- - [ ] Implement logout feature
140
- - [ ] Fix failing tests
141
-
142
- ### Return To
143
- Return to Coder
144
- ```
145
-
146
154
  ## Important
147
155
 
148
- - **Actually run it**: Don't just look at files, execute and verify
149
- - **Compare against requirements**: Re-read original task requirements, check for gaps
150
- - **Don't take at face value**: Don't trust "complete" claims, verify yourself
151
- - **Be specific**: Clearly state "what" is "how" problematic
156
+ - **Actually run**: Don't just look at files, execute and verify
157
+ - **Compare with requirements**: Re-read original task requirements, check for gaps
158
+ - **Don't take at face value**: Don't trust "done", verify yourself
159
+ - **Be specific**: Clarify "what" is "how" problematic
152
160
 
153
- **Remember**: You are the final gatekeeper. What passes here reaches users. Don't let "probably fine" pass.
161
+ **Remember**: You are the final gatekeeper. What passes through here reaches the user. Don't let "probably fine" pass.