takt 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/README.md +59 -28
  2. package/builtins/en/config.yaml +9 -1
  3. package/builtins/en/facets/instructions/dual-team-leader-implement.md +7 -2
  4. package/builtins/en/facets/instructions/fix-maintenance.md +43 -0
  5. package/builtins/en/facets/instructions/implement-maintenance.md +72 -0
  6. package/builtins/en/facets/instructions/plan-maintenance.md +51 -0
  7. package/builtins/en/facets/instructions/review-coding.md +8 -0
  8. package/builtins/en/facets/instructions/supervise-maintenance.md +110 -0
  9. package/builtins/en/facets/instructions/team-leader-implement.md +6 -1
  10. package/builtins/en/facets/instructions/write-tests-first.md +5 -0
  11. package/builtins/en/facets/instructions/write-tests-maintenance.md +45 -0
  12. package/builtins/en/facets/knowledge/architecture.md +18 -13
  13. package/builtins/en/facets/knowledge/cqrs-es.md +48 -0
  14. package/builtins/en/facets/knowledge/existing-system.md +70 -0
  15. package/builtins/en/facets/knowledge/frontend.md +25 -0
  16. package/builtins/en/facets/knowledge/react.md +35 -0
  17. package/builtins/en/facets/output-contracts/coding-review.md +41 -0
  18. package/builtins/en/facets/output-contracts/frontend-review.md +1 -0
  19. package/builtins/en/facets/output-contracts/maintenance-scope.md +29 -0
  20. package/builtins/en/facets/personas/coding-reviewer.md +27 -0
  21. package/builtins/en/facets/personas/dual-supervisor.md +1 -1
  22. package/builtins/en/facets/policies/ai-antipattern.md +59 -0
  23. package/builtins/en/facets/policies/coding.md +85 -3
  24. package/builtins/en/facets/policies/existing-system-respect.md +73 -0
  25. package/builtins/en/facets/policies/qa.md +3 -1
  26. package/builtins/en/facets/policies/review.md +25 -12
  27. package/builtins/en/facets/policies/testing.md +33 -0
  28. package/builtins/en/workflow-categories.yaml +1 -0
  29. package/builtins/en/workflows/auto-improvement-loop.yaml +20 -4
  30. package/builtins/en/workflows/default-peer-review.yaml +25 -3
  31. package/builtins/en/workflows/frontend-maintenance.yaml +499 -0
  32. package/builtins/en/workflows/peer-review.yaml +23 -1
  33. package/builtins/en/workflows/review-fix-takt-default.yaml +30 -2
  34. package/builtins/ja/config.yaml +9 -1
  35. package/builtins/ja/facets/instructions/dual-team-leader-implement.md +7 -2
  36. package/builtins/ja/facets/instructions/fix-maintenance.md +43 -0
  37. package/builtins/ja/facets/instructions/implement-maintenance.md +72 -0
  38. package/builtins/ja/facets/instructions/plan-maintenance.md +51 -0
  39. package/builtins/ja/facets/instructions/review-coding.md +8 -0
  40. package/builtins/ja/facets/instructions/supervise-maintenance.md +110 -0
  41. package/builtins/ja/facets/instructions/team-leader-implement.md +6 -1
  42. package/builtins/ja/facets/instructions/write-tests-first.md +5 -0
  43. package/builtins/ja/facets/instructions/write-tests-maintenance.md +45 -0
  44. package/builtins/ja/facets/knowledge/architecture.md +18 -13
  45. package/builtins/ja/facets/knowledge/cqrs-es.md +48 -0
  46. package/builtins/ja/facets/knowledge/existing-system.md +70 -0
  47. package/builtins/ja/facets/knowledge/frontend.md +25 -0
  48. package/builtins/ja/facets/knowledge/react.md +35 -0
  49. package/builtins/ja/facets/output-contracts/coding-review.md +41 -0
  50. package/builtins/ja/facets/output-contracts/frontend-review.md +1 -0
  51. package/builtins/ja/facets/output-contracts/maintenance-scope.md +29 -0
  52. package/builtins/ja/facets/personas/coding-reviewer.md +27 -0
  53. package/builtins/ja/facets/personas/dual-supervisor.md +2 -2
  54. package/builtins/ja/facets/policies/ai-antipattern.md +59 -0
  55. package/builtins/ja/facets/policies/coding.md +85 -3
  56. package/builtins/ja/facets/policies/existing-system-respect.md +73 -0
  57. package/builtins/ja/facets/policies/qa.md +3 -1
  58. package/builtins/ja/facets/policies/review.md +25 -12
  59. package/builtins/ja/facets/policies/testing.md +33 -0
  60. package/builtins/ja/workflow-categories.yaml +1 -0
  61. package/builtins/ja/workflows/auto-improvement-loop.yaml +20 -4
  62. package/builtins/ja/workflows/default-peer-review.yaml +25 -3
  63. package/builtins/ja/workflows/frontend-maintenance.yaml +499 -0
  64. package/builtins/ja/workflows/peer-review.yaml +23 -1
  65. package/builtins/ja/workflows/review-fix-takt-default.yaml +30 -2
  66. package/builtins/skill/references/yaml-schema.md +8 -3
  67. package/builtins/skill-codex/references/yaml-schema.md +8 -3
  68. package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
  69. package/dist/agents/decompose-task-usecase.js +3 -2
  70. package/dist/agents/decompose-task-usecase.js.map +1 -1
  71. package/dist/agents/judge-status-usecase.d.ts.map +1 -1
  72. package/dist/agents/judge-status-usecase.js +4 -3
  73. package/dist/agents/judge-status-usecase.js.map +1 -1
  74. package/dist/agents/provider-call-options.d.ts +4 -0
  75. package/dist/agents/provider-call-options.d.ts.map +1 -0
  76. package/dist/agents/provider-call-options.js +9 -0
  77. package/dist/agents/provider-call-options.js.map +1 -0
  78. package/dist/agents/runner.js +1 -1
  79. package/dist/agents/runner.js.map +1 -1
  80. package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
  81. package/dist/agents/structured-caller/prompt-based-structured-caller.js +5 -4
  82. package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
  83. package/dist/agents/team-leader-structured-output.d.ts.map +1 -1
  84. package/dist/agents/team-leader-structured-output.js +21 -0
  85. package/dist/agents/team-leader-structured-output.js.map +1 -1
  86. package/dist/app/cli/commands.js +7 -1
  87. package/dist/app/cli/commands.js.map +1 -1
  88. package/dist/app/cli/program.js +1 -1
  89. package/dist/app/cli/program.js.map +1 -1
  90. package/dist/app/cli/routing.d.ts.map +1 -1
  91. package/dist/app/cli/routing.js +8 -1
  92. package/dist/app/cli/routing.js.map +1 -1
  93. package/dist/core/models/assistant-config.d.ts +4 -0
  94. package/dist/core/models/assistant-config.d.ts.map +1 -0
  95. package/dist/core/models/assistant-config.js +4 -0
  96. package/dist/core/models/assistant-config.js.map +1 -0
  97. package/dist/core/models/config-schemas.d.ts +160 -9
  98. package/dist/core/models/config-schemas.d.ts.map +1 -1
  99. package/dist/core/models/config-schemas.js +12 -2
  100. package/dist/core/models/config-schemas.js.map +1 -1
  101. package/dist/core/models/config-types.d.ts +30 -4
  102. package/dist/core/models/config-types.d.ts.map +1 -1
  103. package/dist/core/models/index.d.ts +1 -1
  104. package/dist/core/models/index.d.ts.map +1 -1
  105. package/dist/core/models/index.js.map +1 -1
  106. package/dist/core/models/provider-profiles.d.ts +1 -1
  107. package/dist/core/models/provider-profiles.d.ts.map +1 -1
  108. package/dist/core/models/quality-gate-defaults.d.ts +2 -0
  109. package/dist/core/models/quality-gate-defaults.d.ts.map +1 -0
  110. package/dist/core/models/quality-gate-defaults.js +2 -0
  111. package/dist/core/models/quality-gate-defaults.js.map +1 -0
  112. package/dist/core/models/response.d.ts +1 -1
  113. package/dist/core/models/response.d.ts.map +1 -1
  114. package/dist/core/models/response.js +1 -1
  115. package/dist/core/models/response.js.map +1 -1
  116. package/dist/core/models/schema-base.d.ts +80 -3
  117. package/dist/core/models/schema-base.d.ts.map +1 -1
  118. package/dist/core/models/schema-base.js +76 -2
  119. package/dist/core/models/schema-base.js.map +1 -1
  120. package/dist/core/models/types.d.ts +2 -2
  121. package/dist/core/models/types.d.ts.map +1 -1
  122. package/dist/core/models/workflow-provider-options.d.ts +7 -0
  123. package/dist/core/models/workflow-provider-options.d.ts.map +1 -1
  124. package/dist/core/models/workflow-schemas.d.ts +368 -51
  125. package/dist/core/models/workflow-schemas.d.ts.map +1 -1
  126. package/dist/core/models/workflow-system-input-types.d.ts +8 -1
  127. package/dist/core/models/workflow-system-input-types.d.ts.map +1 -1
  128. package/dist/core/models/workflow-system-schemas.d.ts +7 -1
  129. package/dist/core/models/workflow-system-schemas.d.ts.map +1 -1
  130. package/dist/core/models/workflow-system-schemas.js +12 -1
  131. package/dist/core/models/workflow-system-schemas.js.map +1 -1
  132. package/dist/core/models/workflow-types.d.ts +13 -5
  133. package/dist/core/models/workflow-types.d.ts.map +1 -1
  134. package/dist/core/models/workflow-types.js.map +1 -1
  135. package/dist/core/workflow/engine/OptionsBuilder.d.ts +1 -0
  136. package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
  137. package/dist/core/workflow/engine/OptionsBuilder.js +9 -4
  138. package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
  139. package/dist/core/workflow/engine/ParallelRunner.d.ts +11 -0
  140. package/dist/core/workflow/engine/ParallelRunner.d.ts.map +1 -1
  141. package/dist/core/workflow/engine/ParallelRunner.js +139 -19
  142. package/dist/core/workflow/engine/ParallelRunner.js.map +1 -1
  143. package/dist/core/workflow/engine/TeamLeaderRunner.d.ts.map +1 -1
  144. package/dist/core/workflow/engine/TeamLeaderRunner.js +55 -23
  145. package/dist/core/workflow/engine/TeamLeaderRunner.js.map +1 -1
  146. package/dist/core/workflow/engine/WorkflowEngine.d.ts +1 -0
  147. package/dist/core/workflow/engine/WorkflowEngine.d.ts.map +1 -1
  148. package/dist/core/workflow/engine/WorkflowEngine.js +29 -4
  149. package/dist/core/workflow/engine/WorkflowEngine.js.map +1 -1
  150. package/dist/core/workflow/engine/WorkflowEngineSetup.d.ts.map +1 -1
  151. package/dist/core/workflow/engine/WorkflowEngineSetup.js +2 -0
  152. package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
  153. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts +8 -0
  154. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
  155. package/dist/core/workflow/engine/WorkflowRunLoop.js +78 -7
  156. package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
  157. package/dist/core/workflow/engine/team-leader-execution.d.ts +1 -0
  158. package/dist/core/workflow/engine/team-leader-execution.d.ts.map +1 -1
  159. package/dist/core/workflow/engine/team-leader-execution.js +22 -0
  160. package/dist/core/workflow/engine/team-leader-execution.js.map +1 -1
  161. package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts +13 -0
  162. package/dist/core/workflow/engine/team-leader-timeout-fallback.d.ts.map +1 -0
  163. package/dist/core/workflow/engine/team-leader-timeout-fallback.js +125 -0
  164. package/dist/core/workflow/engine/team-leader-timeout-fallback.js.map +1 -0
  165. package/dist/core/workflow/instruction/InstructionBuilder.d.ts.map +1 -1
  166. package/dist/core/workflow/instruction/InstructionBuilder.js +4 -3
  167. package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
  168. package/dist/core/workflow/observability/workflowSpans.d.ts +28 -0
  169. package/dist/core/workflow/observability/workflowSpans.d.ts.map +1 -0
  170. package/dist/core/workflow/observability/workflowSpans.js +107 -0
  171. package/dist/core/workflow/observability/workflowSpans.js.map +1 -0
  172. package/dist/core/workflow/part-definition-validator.d.ts.map +1 -1
  173. package/dist/core/workflow/part-definition-validator.js +4 -0
  174. package/dist/core/workflow/part-definition-validator.js.map +1 -1
  175. package/dist/core/workflow/permission-profile-resolution.d.ts.map +1 -1
  176. package/dist/core/workflow/permission-profile-resolution.js +1 -0
  177. package/dist/core/workflow/permission-profile-resolution.js.map +1 -1
  178. package/dist/core/workflow/phase-runner.d.ts +1 -3
  179. package/dist/core/workflow/phase-runner.d.ts.map +1 -1
  180. package/dist/core/workflow/phase-runner.js.map +1 -1
  181. package/dist/core/workflow/quality-gates/commandGateMessage.d.ts +4 -0
  182. package/dist/core/workflow/quality-gates/commandGateMessage.d.ts.map +1 -0
  183. package/dist/core/workflow/quality-gates/commandGateMessage.js +84 -0
  184. package/dist/core/workflow/quality-gates/commandGateMessage.js.map +1 -0
  185. package/dist/core/workflow/quality-gates/commandGateRunner.d.ts +3 -0
  186. package/dist/core/workflow/quality-gates/commandGateRunner.d.ts.map +1 -0
  187. package/dist/core/workflow/quality-gates/commandGateRunner.js +242 -0
  188. package/dist/core/workflow/quality-gates/commandGateRunner.js.map +1 -0
  189. package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts +3 -0
  190. package/dist/core/workflow/quality-gates/qualityGateRunner.d.ts.map +1 -0
  191. package/dist/core/workflow/quality-gates/qualityGateRunner.js +29 -0
  192. package/dist/core/workflow/quality-gates/qualityGateRunner.js.map +1 -0
  193. package/dist/core/workflow/quality-gates/types.d.ts +41 -0
  194. package/dist/core/workflow/quality-gates/types.d.ts.map +1 -0
  195. package/dist/core/workflow/quality-gates/types.js +2 -0
  196. package/dist/core/workflow/quality-gates/types.js.map +1 -0
  197. package/dist/core/workflow/report-phase-runner.d.ts.map +1 -1
  198. package/dist/core/workflow/report-phase-runner.js +3 -2
  199. package/dist/core/workflow/report-phase-runner.js.map +1 -1
  200. package/dist/core/workflow/run/run-meta.d.ts +3 -1
  201. package/dist/core/workflow/run/run-meta.d.ts.map +1 -1
  202. package/dist/core/workflow/run/run-meta.js +2 -0
  203. package/dist/core/workflow/run/run-meta.js.map +1 -1
  204. package/dist/core/workflow/run/run-slug.d.ts +2 -0
  205. package/dist/core/workflow/run/run-slug.d.ts.map +1 -0
  206. package/dist/core/workflow/run/run-slug.js +19 -0
  207. package/dist/core/workflow/run/run-slug.js.map +1 -0
  208. package/dist/core/workflow/status-judgment-phase.d.ts.map +1 -1
  209. package/dist/core/workflow/status-judgment-phase.js +7 -3
  210. package/dist/core/workflow/status-judgment-phase.js.map +1 -1
  211. package/dist/core/workflow/system/system-step-effect-runner.d.ts.map +1 -1
  212. package/dist/core/workflow/system/system-step-effect-runner.js +16 -1
  213. package/dist/core/workflow/system/system-step-effect-runner.js.map +1 -1
  214. package/dist/core/workflow/team-leader-continuation-ids.d.ts +3 -0
  215. package/dist/core/workflow/team-leader-continuation-ids.d.ts.map +1 -0
  216. package/dist/core/workflow/team-leader-continuation-ids.js +6 -0
  217. package/dist/core/workflow/team-leader-continuation-ids.js.map +1 -0
  218. package/dist/core/workflow/types.d.ts +7 -1
  219. package/dist/core/workflow/types.d.ts.map +1 -1
  220. package/dist/features/interactive/assistantInitFiles.d.ts +2 -0
  221. package/dist/features/interactive/assistantInitFiles.d.ts.map +1 -0
  222. package/dist/features/interactive/assistantInitFiles.js +110 -0
  223. package/dist/features/interactive/assistantInitFiles.js.map +1 -0
  224. package/dist/features/interactive/conversationLoop.d.ts +5 -1
  225. package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
  226. package/dist/features/interactive/conversationLoop.js +33 -11
  227. package/dist/features/interactive/conversationLoop.js.map +1 -1
  228. package/dist/features/interactive/imageAttachments.d.ts +20 -0
  229. package/dist/features/interactive/imageAttachments.d.ts.map +1 -0
  230. package/dist/features/interactive/imageAttachments.js +75 -0
  231. package/dist/features/interactive/imageAttachments.js.map +1 -0
  232. package/dist/features/interactive/index.d.ts +2 -1
  233. package/dist/features/interactive/index.d.ts.map +1 -1
  234. package/dist/features/interactive/index.js +1 -1
  235. package/dist/features/interactive/index.js.map +1 -1
  236. package/dist/features/interactive/inlineImagePaste.d.ts +21 -0
  237. package/dist/features/interactive/inlineImagePaste.d.ts.map +1 -0
  238. package/dist/features/interactive/inlineImagePaste.js +136 -0
  239. package/dist/features/interactive/inlineImagePaste.js.map +1 -0
  240. package/dist/features/interactive/instructModeTypes.d.ts +23 -0
  241. package/dist/features/interactive/instructModeTypes.d.ts.map +1 -0
  242. package/dist/features/interactive/instructModeTypes.js +2 -0
  243. package/dist/features/interactive/instructModeTypes.js.map +1 -0
  244. package/dist/features/interactive/interactive-summary.d.ts +1 -1
  245. package/dist/features/interactive/interactive-summary.d.ts.map +1 -1
  246. package/dist/features/interactive/interactive-summary.js +4 -3
  247. package/dist/features/interactive/interactive-summary.js.map +1 -1
  248. package/dist/features/interactive/interactive.d.ts +8 -3
  249. package/dist/features/interactive/interactive.d.ts.map +1 -1
  250. package/dist/features/interactive/interactive.js +4 -0
  251. package/dist/features/interactive/interactive.js.map +1 -1
  252. package/dist/features/interactive/interactiveInput.d.ts +2 -1
  253. package/dist/features/interactive/interactiveInput.d.ts.map +1 -1
  254. package/dist/features/interactive/interactiveInput.js +5 -1
  255. package/dist/features/interactive/interactiveInput.js.map +1 -1
  256. package/dist/features/interactive/lineEditor.d.ts +2 -0
  257. package/dist/features/interactive/lineEditor.d.ts.map +1 -1
  258. package/dist/features/interactive/lineEditor.js +130 -9
  259. package/dist/features/interactive/lineEditor.js.map +1 -1
  260. package/dist/features/interactive/passthroughMode.d.ts.map +1 -1
  261. package/dist/features/interactive/passthroughMode.js +8 -4
  262. package/dist/features/interactive/passthroughMode.js.map +1 -1
  263. package/dist/features/interactive/promptSections.d.ts +2 -0
  264. package/dist/features/interactive/promptSections.d.ts.map +1 -1
  265. package/dist/features/interactive/promptSections.js +7 -1
  266. package/dist/features/interactive/promptSections.js.map +1 -1
  267. package/dist/features/interactive/quietMode.d.ts.map +1 -1
  268. package/dist/features/interactive/quietMode.js +12 -8
  269. package/dist/features/interactive/quietMode.js.map +1 -1
  270. package/dist/features/interactive/retryMode.d.ts +10 -13
  271. package/dist/features/interactive/retryMode.d.ts.map +1 -1
  272. package/dist/features/interactive/retryMode.js +42 -22
  273. package/dist/features/interactive/retryMode.js.map +1 -1
  274. package/dist/features/interactive/slashCommandRegistry.d.ts.map +1 -1
  275. package/dist/features/interactive/slashCommandRegistry.js +1 -0
  276. package/dist/features/interactive/slashCommandRegistry.js.map +1 -1
  277. package/dist/features/tasks/add/index.d.ts +4 -0
  278. package/dist/features/tasks/add/index.d.ts.map +1 -1
  279. package/dist/features/tasks/add/index.js +12 -29
  280. package/dist/features/tasks/add/index.js.map +1 -1
  281. package/dist/features/tasks/attachments.d.ts +19 -0
  282. package/dist/features/tasks/attachments.d.ts.map +1 -0
  283. package/dist/features/tasks/attachments.js +129 -0
  284. package/dist/features/tasks/attachments.js.map +1 -0
  285. package/dist/features/tasks/execute/resolveTask.d.ts.map +1 -1
  286. package/dist/features/tasks/execute/resolveTask.js +4 -3
  287. package/dist/features/tasks/execute/resolveTask.js.map +1 -1
  288. package/dist/features/tasks/execute/runMeta.d.ts +5 -1
  289. package/dist/features/tasks/execute/runMeta.d.ts.map +1 -1
  290. package/dist/features/tasks/execute/runMeta.js +10 -4
  291. package/dist/features/tasks/execute/runMeta.js.map +1 -1
  292. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  293. package/dist/features/tasks/execute/selectAndExecute.js +48 -4
  294. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  295. package/dist/features/tasks/execute/taskSpecContext.d.ts +7 -2
  296. package/dist/features/tasks/execute/taskSpecContext.d.ts.map +1 -1
  297. package/dist/features/tasks/execute/taskSpecContext.js +23 -36
  298. package/dist/features/tasks/execute/taskSpecContext.js.map +1 -1
  299. package/dist/features/tasks/execute/taskWorkflowExecution.d.ts.map +1 -1
  300. package/dist/features/tasks/execute/taskWorkflowExecution.js +2 -1
  301. package/dist/features/tasks/execute/taskWorkflowExecution.js.map +1 -1
  302. package/dist/features/tasks/execute/traceReportRedaction.d.ts +0 -1
  303. package/dist/features/tasks/execute/traceReportRedaction.d.ts.map +1 -1
  304. package/dist/features/tasks/execute/traceReportRedaction.js +1 -9
  305. package/dist/features/tasks/execute/traceReportRedaction.js.map +1 -1
  306. package/dist/features/tasks/execute/types.d.ts +8 -0
  307. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  308. package/dist/features/tasks/execute/workflowExecution.d.ts.map +1 -1
  309. package/dist/features/tasks/execute/workflowExecution.js +12 -1
  310. package/dist/features/tasks/execute/workflowExecution.js.map +1 -1
  311. package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts +5 -1
  312. package/dist/features/tasks/execute/workflowExecutionBootstrap.d.ts.map +1 -1
  313. package/dist/features/tasks/execute/workflowExecutionBootstrap.js +7 -2
  314. package/dist/features/tasks/execute/workflowExecutionBootstrap.js.map +1 -1
  315. package/dist/features/tasks/index.d.ts +1 -0
  316. package/dist/features/tasks/index.d.ts.map +1 -1
  317. package/dist/features/tasks/index.js +1 -0
  318. package/dist/features/tasks/index.js.map +1 -1
  319. package/dist/features/tasks/list/instructMode.d.ts +2 -20
  320. package/dist/features/tasks/list/instructMode.d.ts.map +1 -1
  321. package/dist/features/tasks/list/instructMode.js +15 -4
  322. package/dist/features/tasks/list/instructMode.js.map +1 -1
  323. package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts +8 -0
  324. package/dist/features/tasks/list/retryTaskSpecAttachments.d.ts.map +1 -0
  325. package/dist/features/tasks/list/retryTaskSpecAttachments.js +87 -0
  326. package/dist/features/tasks/list/retryTaskSpecAttachments.js.map +1 -0
  327. package/dist/features/tasks/list/taskInstructionActions.d.ts.map +1 -1
  328. package/dist/features/tasks/list/taskInstructionActions.js +20 -2
  329. package/dist/features/tasks/list/taskInstructionActions.js.map +1 -1
  330. package/dist/features/tasks/list/taskRetryActions.d.ts.map +1 -1
  331. package/dist/features/tasks/list/taskRetryActions.js +24 -6
  332. package/dist/features/tasks/list/taskRetryActions.js.map +1 -1
  333. package/dist/features/tasks/resume/directInstructMode.d.ts +13 -0
  334. package/dist/features/tasks/resume/directInstructMode.d.ts.map +1 -0
  335. package/dist/features/tasks/resume/directInstructMode.js +67 -0
  336. package/dist/features/tasks/resume/directInstructMode.js.map +1 -0
  337. package/dist/features/tasks/resume/directRunFinder.d.ts +7 -0
  338. package/dist/features/tasks/resume/directRunFinder.d.ts.map +1 -0
  339. package/dist/features/tasks/resume/directRunFinder.js +43 -0
  340. package/dist/features/tasks/resume/directRunFinder.js.map +1 -0
  341. package/dist/features/tasks/resume/index.d.ts +3 -0
  342. package/dist/features/tasks/resume/index.d.ts.map +1 -0
  343. package/dist/features/tasks/resume/index.js +229 -0
  344. package/dist/features/tasks/resume/index.js.map +1 -0
  345. package/dist/features/tasks/taskSpecFile.d.ts +2 -0
  346. package/dist/features/tasks/taskSpecFile.d.ts.map +1 -0
  347. package/dist/features/tasks/taskSpecFile.js +38 -0
  348. package/dist/features/tasks/taskSpecFile.js.map +1 -0
  349. package/dist/infra/claude/executor.d.ts.map +1 -1
  350. package/dist/infra/claude/executor.js +27 -6
  351. package/dist/infra/claude/executor.js.map +1 -1
  352. package/dist/infra/claude/mcp-config.d.ts +7 -0
  353. package/dist/infra/claude/mcp-config.d.ts.map +1 -0
  354. package/dist/infra/claude/mcp-config.js +30 -0
  355. package/dist/infra/claude/mcp-config.js.map +1 -0
  356. package/dist/infra/claude-headless/client.d.ts.map +1 -1
  357. package/dist/infra/claude-headless/client.js +5 -40
  358. package/dist/infra/claude-headless/client.js.map +1 -1
  359. package/dist/infra/claude-headless/result-response.js +1 -1
  360. package/dist/infra/claude-headless/result-response.js.map +1 -1
  361. package/dist/infra/claude-terminal/client.d.ts +4 -0
  362. package/dist/infra/claude-terminal/client.d.ts.map +1 -0
  363. package/dist/infra/claude-terminal/client.js +314 -0
  364. package/dist/infra/claude-terminal/client.js.map +1 -0
  365. package/dist/infra/claude-terminal/command.d.ts +4 -0
  366. package/dist/infra/claude-terminal/command.d.ts.map +1 -0
  367. package/dist/infra/claude-terminal/command.js +50 -0
  368. package/dist/infra/claude-terminal/command.js.map +1 -0
  369. package/dist/infra/claude-terminal/response-normalizer.d.ts +14 -0
  370. package/dist/infra/claude-terminal/response-normalizer.d.ts.map +1 -0
  371. package/dist/infra/claude-terminal/response-normalizer.js +118 -0
  372. package/dist/infra/claude-terminal/response-normalizer.js.map +1 -0
  373. package/dist/infra/claude-terminal/tmux-backend.d.ts +7 -0
  374. package/dist/infra/claude-terminal/tmux-backend.d.ts.map +1 -0
  375. package/dist/infra/claude-terminal/tmux-backend.js +177 -0
  376. package/dist/infra/claude-terminal/tmux-backend.js.map +1 -0
  377. package/dist/infra/claude-terminal/transcript-reader.d.ts +13 -0
  378. package/dist/infra/claude-terminal/transcript-reader.d.ts.map +1 -0
  379. package/dist/infra/claude-terminal/transcript-reader.js +329 -0
  380. package/dist/infra/claude-terminal/transcript-reader.js.map +1 -0
  381. package/dist/infra/claude-terminal/types.d.ts +106 -0
  382. package/dist/infra/claude-terminal/types.d.ts.map +1 -0
  383. package/dist/infra/claude-terminal/types.js +2 -0
  384. package/dist/infra/claude-terminal/types.js.map +1 -0
  385. package/dist/infra/codex/CodexStreamHandler.d.ts +4 -2
  386. package/dist/infra/codex/CodexStreamHandler.d.ts.map +1 -1
  387. package/dist/infra/codex/CodexStreamHandler.js +55 -21
  388. package/dist/infra/codex/CodexStreamHandler.js.map +1 -1
  389. package/dist/infra/codex/client.d.ts +2 -0
  390. package/dist/infra/codex/client.d.ts.map +1 -1
  391. package/dist/infra/codex/client.js +42 -6
  392. package/dist/infra/codex/client.js.map +1 -1
  393. package/dist/infra/config/configNormalizers.d.ts +23 -16
  394. package/dist/infra/config/configNormalizers.d.ts.map +1 -1
  395. package/dist/infra/config/configNormalizers.js +69 -7
  396. package/dist/infra/config/configNormalizers.js.map +1 -1
  397. package/dist/infra/config/env/global-current-env-specs.d.ts.map +1 -1
  398. package/dist/infra/config/env/global-current-env-specs.js +7 -0
  399. package/dist/infra/config/env/global-current-env-specs.js.map +1 -1
  400. package/dist/infra/config/env/project-current-env-specs.d.ts.map +1 -1
  401. package/dist/infra/config/env/project-current-env-specs.js +7 -0
  402. package/dist/infra/config/env/project-current-env-specs.js.map +1 -1
  403. package/dist/infra/config/global/globalConfigCore.d.ts.map +1 -1
  404. package/dist/infra/config/global/globalConfigCore.js +5 -0
  405. package/dist/infra/config/global/globalConfigCore.js.map +1 -1
  406. package/dist/infra/config/global/globalConfigSerializer.d.ts.map +1 -1
  407. package/dist/infra/config/global/globalConfigSerializer.js +10 -0
  408. package/dist/infra/config/global/globalConfigSerializer.js.map +1 -1
  409. package/dist/infra/config/global/initialization.d.ts +1 -1
  410. package/dist/infra/config/global/initialization.d.ts.map +1 -1
  411. package/dist/infra/config/global/initialization.js +1 -0
  412. package/dist/infra/config/global/initialization.js.map +1 -1
  413. package/dist/infra/config/loaders/qualityGateOverrides.d.ts +3 -2
  414. package/dist/infra/config/loaders/qualityGateOverrides.d.ts.map +1 -1
  415. package/dist/infra/config/loaders/qualityGateOverrides.js +42 -3
  416. package/dist/infra/config/loaders/qualityGateOverrides.js.map +1 -1
  417. package/dist/infra/config/loaders/workflowFileLoader.d.ts.map +1 -1
  418. package/dist/infra/config/loaders/workflowFileLoader.js +2 -2
  419. package/dist/infra/config/loaders/workflowFileLoader.js.map +1 -1
  420. package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts +3 -1
  421. package/dist/infra/config/loaders/workflowNormalizationPolicies.d.ts.map +1 -1
  422. package/dist/infra/config/loaders/workflowNormalizationPolicies.js +28 -0
  423. package/dist/infra/config/loaders/workflowNormalizationPolicies.js.map +1 -1
  424. package/dist/infra/config/loaders/workflowParser.d.ts +2 -2
  425. package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
  426. package/dist/infra/config/loaders/workflowParser.js +3 -2
  427. package/dist/infra/config/loaders/workflowParser.js.map +1 -1
  428. package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
  429. package/dist/infra/config/loaders/workflowStepNormalizer.js +2 -1
  430. package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
  431. package/dist/infra/config/observabilityConfig.d.ts +13 -0
  432. package/dist/infra/config/observabilityConfig.d.ts.map +1 -0
  433. package/dist/infra/config/observabilityConfig.js +52 -0
  434. package/dist/infra/config/observabilityConfig.js.map +1 -0
  435. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  436. package/dist/infra/config/project/projectConfig.js +23 -5
  437. package/dist/infra/config/project/projectConfig.js.map +1 -1
  438. package/dist/infra/config/project/projectConfigTransforms.d.ts +5 -1
  439. package/dist/infra/config/project/projectConfigTransforms.d.ts.map +1 -1
  440. package/dist/infra/config/project/projectConfigTransforms.js +8 -0
  441. package/dist/infra/config/project/projectConfigTransforms.js.map +1 -1
  442. package/dist/infra/config/providerOptions.d.ts +8 -2
  443. package/dist/infra/config/providerOptions.d.ts.map +1 -1
  444. package/dist/infra/config/providerOptions.js +49 -1
  445. package/dist/infra/config/providerOptions.js.map +1 -1
  446. package/dist/infra/config/providerOptionsContract.d.ts +3 -3
  447. package/dist/infra/config/providerOptionsContract.d.ts.map +1 -1
  448. package/dist/infra/config/providerOptionsContract.js +14 -0
  449. package/dist/infra/config/providerOptionsContract.js.map +1 -1
  450. package/dist/infra/config/resolveConfigValue.d.ts.map +1 -1
  451. package/dist/infra/config/resolveConfigValue.js +18 -0
  452. package/dist/infra/config/resolveConfigValue.js.map +1 -1
  453. package/dist/infra/config/resolvedConfig.d.ts +2 -1
  454. package/dist/infra/config/resolvedConfig.d.ts.map +1 -1
  455. package/dist/infra/config/traced/tracedConfigSchema.d.ts.map +1 -1
  456. package/dist/infra/config/traced/tracedConfigSchema.js +16 -0
  457. package/dist/infra/config/traced/tracedConfigSchema.js.map +1 -1
  458. package/dist/infra/git/format.d.ts.map +1 -1
  459. package/dist/infra/git/format.js +75 -8
  460. package/dist/infra/git/format.js.map +1 -1
  461. package/dist/infra/git/index.d.ts +1 -1
  462. package/dist/infra/git/index.d.ts.map +1 -1
  463. package/dist/infra/git/types.d.ts +5 -0
  464. package/dist/infra/git/types.d.ts.map +1 -1
  465. package/dist/infra/github/pr.d.ts.map +1 -1
  466. package/dist/infra/github/pr.js +174 -28
  467. package/dist/infra/github/pr.js.map +1 -1
  468. package/dist/infra/observability/otelFoundation.d.ts +6 -0
  469. package/dist/infra/observability/otelFoundation.d.ts.map +1 -0
  470. package/dist/infra/observability/otelFoundation.js +89 -0
  471. package/dist/infra/observability/otelFoundation.js.map +1 -0
  472. package/dist/infra/opencode/client.d.ts.map +1 -1
  473. package/dist/infra/opencode/client.js +19 -15
  474. package/dist/infra/opencode/client.js.map +1 -1
  475. package/dist/infra/providers/claude-terminal.d.ts +6 -0
  476. package/dist/infra/providers/claude-terminal.d.ts.map +1 -0
  477. package/dist/infra/providers/claude-terminal.js +70 -0
  478. package/dist/infra/providers/claude-terminal.js.map +1 -0
  479. package/dist/infra/providers/index.d.ts.map +1 -1
  480. package/dist/infra/providers/index.js +2 -0
  481. package/dist/infra/providers/index.js.map +1 -1
  482. package/dist/infra/providers/provider-capabilities.d.ts +1 -0
  483. package/dist/infra/providers/provider-capabilities.d.ts.map +1 -1
  484. package/dist/infra/providers/provider-capabilities.js +16 -0
  485. package/dist/infra/providers/provider-capabilities.js.map +1 -1
  486. package/dist/infra/rate-limit/detection.d.ts +2 -0
  487. package/dist/infra/rate-limit/detection.d.ts.map +1 -1
  488. package/dist/infra/rate-limit/detection.js +14 -1
  489. package/dist/infra/rate-limit/detection.js.map +1 -1
  490. package/dist/infra/task/clone-base-branch.d.ts +11 -0
  491. package/dist/infra/task/clone-base-branch.d.ts.map +1 -1
  492. package/dist/infra/task/clone-base-branch.js +34 -4
  493. package/dist/infra/task/clone-base-branch.js.map +1 -1
  494. package/dist/infra/task/clone.d.ts +2 -1
  495. package/dist/infra/task/clone.d.ts.map +1 -1
  496. package/dist/infra/task/clone.js +20 -3
  497. package/dist/infra/task/clone.js.map +1 -1
  498. package/dist/infra/task/index.d.ts +1 -1
  499. package/dist/infra/task/index.d.ts.map +1 -1
  500. package/dist/infra/task/index.js +1 -1
  501. package/dist/infra/task/index.js.map +1 -1
  502. package/dist/infra/task/projectLocalTaktSync.d.ts.map +1 -1
  503. package/dist/infra/task/projectLocalTaktSync.js +6 -2
  504. package/dist/infra/task/projectLocalTaktSync.js.map +1 -1
  505. package/dist/infra/task/runner.d.ts +2 -2
  506. package/dist/infra/task/runner.d.ts.map +1 -1
  507. package/dist/infra/task/runner.js +4 -4
  508. package/dist/infra/task/runner.js.map +1 -1
  509. package/dist/infra/task/taskRecordMutations.d.ts +1 -1
  510. package/dist/infra/task/taskRecordMutations.d.ts.map +1 -1
  511. package/dist/infra/task/taskRecordMutations.js +5 -1
  512. package/dist/infra/task/taskRecordMutations.js.map +1 -1
  513. package/dist/infra/task/taskRetryService.d.ts +2 -2
  514. package/dist/infra/task/taskRetryService.d.ts.map +1 -1
  515. package/dist/infra/task/taskRetryService.js +4 -4
  516. package/dist/infra/task/taskRetryService.js.map +1 -1
  517. package/dist/infra/workflow/system/system-enqueue-effect.d.ts +2 -2
  518. package/dist/infra/workflow/system/system-enqueue-effect.d.ts.map +1 -1
  519. package/dist/infra/workflow/system/system-enqueue-effect.js +5 -2
  520. package/dist/infra/workflow/system/system-enqueue-effect.js.map +1 -1
  521. package/dist/shared/constants.d.ts +1 -0
  522. package/dist/shared/constants.d.ts.map +1 -1
  523. package/dist/shared/constants.js +1 -0
  524. package/dist/shared/constants.js.map +1 -1
  525. package/dist/shared/i18n/labels_en.yaml +3 -1
  526. package/dist/shared/i18n/labels_ja.yaml +3 -1
  527. package/dist/shared/prompts/en/score_direct_instruct_system_prompt.md +63 -0
  528. package/dist/shared/prompts/en/score_retry_system_prompt.md +2 -2
  529. package/dist/shared/prompts/ja/score_direct_instruct_system_prompt.md +63 -0
  530. package/dist/shared/prompts/ja/score_retry_system_prompt.md +2 -2
  531. package/dist/shared/types/provider.d.ts +1 -1
  532. package/dist/shared/types/provider.d.ts.map +1 -1
  533. package/dist/shared/utils/debug.d.ts +2 -0
  534. package/dist/shared/utils/debug.d.ts.map +1 -1
  535. package/dist/shared/utils/debug.js +1 -0
  536. package/dist/shared/utils/debug.js.map +1 -1
  537. package/dist/shared/utils/sensitiveText.d.ts +2 -0
  538. package/dist/shared/utils/sensitiveText.d.ts.map +1 -0
  539. package/dist/shared/utils/sensitiveText.js +40 -0
  540. package/dist/shared/utils/sensitiveText.js.map +1 -0
  541. package/package.json +4 -2
package/README.md CHANGED
@@ -2,35 +2,53 @@
2
2
 
3
3
  🇯🇵 [日本語ドキュメント](./docs/README.ja.md) | 💬 [Discord Community](https://discord.gg/R2Xz3uYWxD)
4
4
 
5
- **T**AKT **A**gent **K**oordination **T**opology — Give your AI coding agents structured review loops, managed prompts, and guardrails — so they deliver quality code, not just code.
5
+ **T**AKT **A**gent **K**oordination **T**opology — Orchestrate multiple AI agents with structured review loops, managed prompts, and guardrails.
6
6
 
7
- TAKT runs AI agents (Claude Code, Codex, OpenCode, Cursor, GitHub Copilot CLI) through YAML-defined workflows with built-in review cycles. You talk to AI to define what you want, queue tasks, and let TAKT handle the execution planning, implementation, multi-stage review, and fix loops all governed by declarative workflow files.
7
+ Talk to AI to define what you want, queue it as a task, and run it with `takt run`. Planning, implementation, review, and fix loops are defined in YAML workflow files, so the process is not left to the agent's discretion. TAKT coordinates Claude Code, Codex, OpenCode, Cursor, and GitHub Copilot CLI as agents with different roles, permissions, and context.
8
+
9
+ TAKT is built primarily for AI coding workflows, but the same model applies beyond coding: any task where multiple AI agents need to coordinate, or where review, judgment, and feedback loops can improve task quality.
8
10
 
9
11
  TAKT is built with TAKT itself (dogfooding).
10
12
 
11
13
  ## Why TAKT
12
14
 
13
- **Batteries included** Architecture, security, and AI antipattern review criteria are built in. Ship code that meets a quality bar from day one.
15
+ AI coding agents are powerful, but they do not automatically create a stable development process. In long-running work, they forget instructions, accumulate polluted context, blur implementation and review responsibilities, and often force humans to repeat the same feedback again and again. That wears people down.
16
+
17
+ Adding more rules to prompts, `CLAUDE.md`, or skills can help, but it cannot enforce the process. Whether the rules are followed is still left to the agent's behavior.
18
+
19
+ TAKT treats AI agents as something to be controlled from the outside, not simply trusted.
14
20
 
15
- **Practical** A tool for daily development, not demos. Talk to AI to refine requirements, queue tasks, and run them. Worktree isolation on task execution, PR creation, and retry on failure.
21
+ Workflows define the phases, and each step receives its own persona, policy, knowledge, instruction, and output contract. TAKT manages implementation, review, fix, and re-review flows declaratively. By separating responsibilities, knowledge, and constraints, then giving each agent only what it needs for the current step, TAKT improves task quality without bloating context.
16
22
 
17
- **Reproducible** Execution paths are declared in YAML, keeping results consistent. Workflows are shareable a workflow built by one team member can be used by anyone else to run the same quality process. Every step is logged in NDJSON for full traceability from task to PR.
23
+ Reviews cannot be silently skipped. Findings route work back to fix steps, and human judgment can be requested when needed. Tasks run in isolated worktrees, and each step leaves logs and reports so the path from task to PR remains traceable.
18
24
 
19
- **Multi-agent** Orchestrate multiple agents with different personas, permissions, and review criteria. Run parallel reviewers, route failures back to implementers, aggregate results with declarative rules. Prompts are managed as independent facets (persona, policy, knowledge, instruction) that compose freely across workflows ([Faceted Prompting](./docs/faceted-prompting.md)).
25
+ At its core, TAKT runs reusable agent processes built from roles, phases, judgments, and feedback loops.
26
+
27
+ The goal is simple: make development processes reusable, reviewable, and reproducible without depending on constant human intervention.
20
28
 
21
29
  ## Requirements
22
30
 
23
- Choose one:
31
+ The provider you choose determines whether you need to install an external CLI or can run on Node.js alone via a TypeScript SDK.
32
+
33
+ These providers run via SDK (no CLI required, Node.js only):
34
+
35
+ - `claude-sdk` — `@anthropic-ai/claude-agent-sdk`
36
+ - `codex` — `@openai/codex-sdk`
37
+ - `opencode` — `@opencode-ai/sdk`
24
38
 
25
- - **Provider CLIs**: [Claude Code](https://claude.ai/code) (default `claude` provider), [Codex](https://github.com/openai/codex), [OpenCode](https://opencode.ai), [Cursor Agent](https://docs.cursor.com/), or [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli) installed
26
- - **Direct API**: OpenAI / OpenCode API Key (no CLI required)
39
+ These providers require an external CLI:
40
+
41
+ - `claude` — [Claude Code](https://claude.ai/code)
42
+ - `claude-terminal` — [Claude Code](https://claude.ai/code) driven in an interactive terminal session (also requires [`tmux`](https://github.com/tmux/tmux))
43
+ - `copilot` — [GitHub Copilot CLI](https://docs.github.com/en/copilot/github-copilot-in-the-cli)
44
+ - `cursor` — [Cursor Agent](https://docs.cursor.com/)
27
45
 
28
46
  Optional:
29
47
 
30
48
  - [GitHub CLI](https://cli.github.com/) (`gh`) — for `takt #N` (GitHub Issue tasks)
31
49
  - [GitLab CLI](https://gitlab.com/gitlab-org/cli) (`glab`) — for GitLab Issue/MR integration (auto-detected from remote URL)
32
50
 
33
- > **OAuth and API key usage:** Whether OAuth or API key access is permitted varies by provider and use case. Check each provider's terms of service before using TAKT.
51
+ > **OAuth usage:** Whether OAuth is permitted varies by provider and use case. Check each provider's terms of service before using TAKT.
34
52
 
35
53
  ## Quick Start
36
54
 
@@ -92,7 +110,7 @@ takt list
92
110
 
93
111
  ## How It Works
94
112
 
95
- TAKT uses a music metaphor — the name itself comes from the German word for "beat" or "baton stroke," used in conducting to keep an orchestra in time. TAKT uses **workflow** and **step** consistently in both user-facing and implementation-facing terminology.
113
+ The name TAKT comes from the German word for "beat" or "baton stroke," used in conducting to keep an orchestra in time. TAKT uses **workflow** and **step** consistently in both user-facing and implementation-facing terminology.
96
114
 
97
115
  A workflow is defined by a sequence of steps. Use `steps`, `initial_step`, and `max_steps`. Each step specifies a persona (who), permissions (what's allowed), and rules (what happens next). Here's a minimal example:
98
116
 
@@ -137,10 +155,12 @@ When the same workflow name exists in multiple locations, TAKT resolves in this
137
155
 
138
156
  | Workflow | Use Case |
139
157
  |-------|----------|
140
- | `default` | Standard development. Test-first with AI antipattern review and parallel review (architecture + supervisor). |
141
- | `frontend-mini` | Frontend-focused mini configuration. |
142
- | `backend-mini` | Backend-focused mini configuration. |
143
- | `dual-mini` | Frontend + backend mini configuration. |
158
+ | `default` | Standard development workflow. Test-first with AI antipattern review and parallel review (architecture + supervisor). |
159
+ | `frontend` | Frontend development workflow. |
160
+ | `backend` | Backend development workflow. |
161
+ | `dual` | Combined frontend + backend workflow. |
162
+ | `takt-default` | The workflow used to develop TAKT itself. Directly applicable to other CLI tool development. |
163
+ | `*-mini` series | Lightweight variants of each workflow (`default-mini` / `frontend-mini` / `backend-mini` / `dual-mini`). Omits `write_tests`. |
144
164
 
145
165
  See the [Builtin Catalog](./docs/builtin-catalog.md) for all workflows and personas.
146
166
 
@@ -164,7 +184,7 @@ See the [CLI Reference](./docs/cli-reference.md) for all commands and options.
164
184
  Minimal `~/.takt/config.yaml`:
165
185
 
166
186
  ```yaml
167
- provider: claude # claude, claude-sdk, codex, opencode, cursor, or copilot
187
+ provider: claude # claude, claude-sdk, claude-terminal, codex, opencode, cursor, or copilot
168
188
  model: sonnet # passed directly to provider
169
189
  language: en # en or ja
170
190
  ```
@@ -202,7 +222,7 @@ You are a code reviewer specialized in security.
202
222
 
203
223
  Reference it in your workflow: `persona: my-reviewer`
204
224
 
205
- See the [Workflow Guide](./docs/workflows.md) and [Agent Guide](./docs/agents.md) for details.
225
+ See the [Workflow Guide](./docs/workflows.md) for details. The list of builtin personas is in the [Builtin Catalog](./docs/builtin-catalog.md).
206
226
 
207
227
  ## CI/CD
208
228
 
@@ -243,35 +263,46 @@ See the [CI/CD Guide](./docs/ci-cd.md) for full setup instructions.
243
263
 
244
264
  Workflow definitions are stored under `workflows/`.
245
265
 
246
- ## API Usage
266
+ ## Adopting Spec-Driven Development
247
267
 
248
- ```typescript
249
- import { WorkflowEngine, loadWorkflow } from 'takt';
268
+ TAKT enforces phase transitions declaratively as a YAML state machine, formalizes the artifact of each phase with output contracts, and routes deviations back via parallel review and fix loops. This structure is particularly well-suited for users who follow Spec-Driven Development (SDD) and keep the spec at the center of the process. Once the spec is well-defined, the AI cannot silently skip a phase, drop an acceptance criterion, or claim "done" without passing the verification gate.
250
269
 
251
- const config = loadWorkflow('default', process.cwd());
252
- if (!config) throw new Error('Workflow not found');
270
+ For users who want to adopt SDD, the community provides [j5ik2o/takt-sdd](https://github.com/j5ik2o/takt-sdd) as a ready-made implementation. It ships pieces for Requirements → Gap Analysis → Design → Tasks → Implementation → Validation, plus an OpenSpec-style change-proposal flow. Install in one command:
253
271
 
254
- const engine = new WorkflowEngine(config, process.cwd(), 'My task');
255
- await engine.run();
272
+ ```bash
273
+ npx create-takt-sdd
256
274
  ```
257
275
 
276
+ See [External Integrations](./docs/external-integrations.md) for other community integrations.
277
+
258
278
  ## Documentation
259
279
 
260
280
  | Document | Description |
261
281
  |----------|-------------|
282
+ | [Tutorial](./docs/tutorial.md) | Improve one example over three phases while queuing, running, and inspecting tasks |
262
283
  | [CLI Reference](./docs/cli-reference.md) | All commands and options |
263
284
  | [Configuration](./docs/configuration.md) | Global and project settings |
285
+ | [Design Philosophy](./docs/design-philosophy.md) | Why TAKT is built around workflows, facets, feedback loops, and traceability |
264
286
  | [Workflow Guide](./docs/workflows.md) | Creating and customizing workflows |
265
- | [Agent Guide](./docs/agents.md) | Custom agent configuration |
266
287
  | [Builtin Catalog](./docs/builtin-catalog.md) | All builtin workflows and personas |
267
288
  | [Faceted Prompting](./docs/faceted-prompting.md) | Prompt design methodology |
268
289
  | [Repertoire Packages](./docs/repertoire.md) | Installing and sharing packages |
269
290
  | [Task Management](./docs/task-management.md) | Task queuing, execution, isolation |
270
- | [Data Flow](./docs/data-flow.md) | Internal data flow and architecture diagrams |
271
291
  | [CI/CD Integration](./docs/ci-cd.md) | GitHub Actions and pipeline mode |
272
- | [Provider Sandbox & Permissions](./docs/provider-sandbox.md) | Sandbox, permission modes, and network access for Codex / OpenCode / Claude |
292
+ | [External Integrations](./docs/external-integrations.md) | Community examples that extend TAKT without modifying core (audit trails, etc.) |
273
293
  | [Changelog](./CHANGELOG.md) ([日本語](./docs/CHANGELOG.ja.md)) | Version history |
274
- | [Security Policy](./SECURITY.md) | Vulnerability reporting |
294
+
295
+ ## Sponsors
296
+
297
+ TAKT is supported by [CodeRabbit](https://coderabbit.link/nrslib) through its Open Source Support Program.
298
+
299
+ <a href="https://coderabbit.link/nrslib">
300
+ <picture>
301
+ <source media="(prefers-color-scheme: dark)" srcset="https://victorious-bubble-f69a016683.media.strapiapp.com/White_Typemark_79b9189d19.svg">
302
+ <source media="(prefers-color-scheme: light)" srcset="https://victorious-bubble-f69a016683.media.strapiapp.com/Orange_Typemark_43bf516c9d.svg">
303
+ <img alt="CodeRabbit" src="https://victorious-bubble-f69a016683.media.strapiapp.com/Orange_Typemark_43bf516c9d.svg" height="40">
304
+ </picture>
305
+ </a>
275
306
 
276
307
  ## Community
277
308
 
@@ -91,10 +91,18 @@ language: en # UI language: en | ja
91
91
  # runtime:
92
92
  # prepare: [node, gradle, ./custom-script.sh]
93
93
 
94
+ # Workflow YAML command gate policy
95
+ # workflow_command_gates:
96
+ # custom_scripts: false
97
+
94
98
  # Workflow-level overrides
95
99
  # workflow_overrides:
96
100
  # quality_gates:
97
- # - "All tests pass"
101
+ # - "All tests pass" # AI completion directive
102
+ # - type: command # Machine-executed gate after step completion
103
+ # name: quality-check
104
+ # command: "./.takt/quality-gates/check.sh"
105
+ # timeout_ms: 300000
98
106
  # quality_gates_edit_only: true
99
107
  # steps:
100
108
  # review:
@@ -6,10 +6,13 @@ Analyze the implementation task and, if decomposition is appropriate, split into
6
6
 
7
7
  1. Assess whether decomposition is appropriate
8
8
  - Identify files to change and check inter-file dependencies
9
- - If cross-cutting concerns exist (shared types, IDs, events), implement in a single part
9
+ - First look for parallelizable responsibility boundaries
10
+ - If cross-cutting concerns exist (shared types, IDs, events), consider staged work: foundation part -> consuming parts -> verification part
10
11
  - If few files are involved, or the task is a rename/refactoring, implement in a single part
12
+ - When parts.length === 1, first consider whether verification separation or staged work is possible
13
+ - Avoid oversized single parts such as "implementation and verification"
11
14
 
12
- 2. If decomposing: prioritize splitting along frontend and backend boundaries
15
+ 2. If decomposing: prioritize splitting along frontend and backend boundaries, or group files by layer/module when that split does not fit
13
16
  - **If design references exist and backend changes are not explicitly required, do not decompose.** Visual structure, copy, spacing, and styling are tightly coupled, and splitting them increases design drift risk
14
17
  - **If design references exist, keep all UI components of the same screen in the same part.** Do not split headers, filters, cards, banners, and modals of one screen across different parts
15
18
  - Splitting between frontend (UI, components, styles) and backend (API, logic, data layer) is the most natural decomposition axis
@@ -19,6 +22,7 @@ Analyze the implementation task and, if decomposition is appropriate, split into
19
22
  - If there are type or interface dependencies, keep both sides in the same group
20
23
  - Never assign the same file to multiple parts
21
24
  - Keep test files and implementation files in the same part
25
+ - Separate implementation parts from verification parts
22
26
 
23
27
  3. Assign file ownership exclusively to each part
24
28
  - Each part's instruction must clearly state:
@@ -32,6 +36,7 @@ Analyze the implementation task and, if decomposition is appropriate, split into
32
36
  - If tests are already written, instruct parts to implement so existing tests pass
33
37
  - Refer to Quality Gates and plan any required verification as a dedicated single verification part
34
38
  - Do not make parallel implementation parts run duplicate full-build or full-test checks
39
+ - Do not duplicate npm test / npm run test:e2e:mock in each implementation part
35
40
 
36
41
  **Constraints:**
37
42
  - If tests or build verification are needed, run them as a dedicated single verification part after dependent implementation parts are complete
@@ -0,0 +1,43 @@
1
+ Use reports in the Report Directory and fix reviewer findings with the minimum diff that preserves existing contracts.
2
+
3
+ **Fix principles:**
4
+ - When a finding includes a "suggested fix", follow it rather than inventing your own workaround
5
+ - Fix the target code directly. Do not deflect findings by adding tests or documentation instead
6
+ - Classify findings as must-fix, verification-only, or out-of-scope
7
+ - Modify only must-fix findings
8
+ - Do not mix unrelated refactoring, renames, comment deletion, or test expectation changes
9
+
10
+ **Report reference policy:**
11
+ - Use the latest review reports in the Report Directory as primary evidence.
12
+ - Past iteration reports are saved as `{filename}.{timestamp}` in the same directory (e.g., `architect-review.md.20260304T123456Z`). For each report, run Glob with a `{report-name}.*` pattern, read up to 2 files in descending timestamp order, and understand persists / reopened trends before starting fixes.
13
+
14
+ **Completion criteria (all must be satisfied):**
15
+ - Must-fix findings in this iteration (new / reopened) have been fixed
16
+ - Potential occurrences of the same `family_tag` have been fixed simultaneously (no partial fixes that cause recurrence)
17
+ - At least one regression test per `family_tag` has been added (mandatory for config-contract and boundary-check findings)
18
+ - Findings with the same `family_tag` from multiple reviewers have been merged and addressed as one fix
19
+ - After fixing, the full diff has been inspected and changes unrelated to the findings or request have been reverted
20
+
21
+ **Important**: After fixing, run the build (type check) and tests.
22
+
23
+ **Required output (include headings)**
24
+ ## Work Results
25
+ - {Summary of actions taken}
26
+ ## Finding Responses
27
+ - {Classification and response for must-fix, verification-only, and out-of-scope findings}
28
+ ## Changes Made
29
+ - {Summary of required and related changes}
30
+ ## Reverted Unnecessary Changes
31
+ - {Changes reverted, or "none"}
32
+ ## Build Results
33
+ - {Build execution results}
34
+ ## Test Results
35
+ - {Test command executed and results}
36
+ ## Convergence gate
37
+ | Metric | Count |
38
+ |--------|-------|
39
+ | new (fixed in this iteration) | {N} |
40
+ | reopened (recurrence fixed) | {N} |
41
+ | persists (carried over, not addressed this iteration) | {N} |
42
+ ## Evidence
43
+ - {List key points from files checked/searches/diffs/logs}
@@ -0,0 +1,72 @@
1
+ Implement according to the plan with the minimum diff while preserving existing contracts.
2
+ Refer only to files within the Report Directory shown in the Workflow Context. Do not search or reference other report directories.
3
+ Use reports in the Report Directory as the primary source of truth. If additional context is needed, you may consult Previous Response and conversation history as secondary sources (Previous Response may be unavailable). If information conflicts, prioritize reports in the Report Directory and actual file contents.
4
+
5
+ **Important**: Add unit tests alongside the implementation.
6
+ - Add unit tests for newly created classes and functions
7
+ - Update relevant tests when modifying existing code, but do not weaken existing expectations for implementation convenience
8
+ - Test file placement: follow the project's conventions
9
+ - Build verification is mandatory. After completing implementation, run the build (type check) and verify there are no type errors
10
+ - Running tests is mandatory. After build succeeds, always run tests and verify results
11
+ - When introducing new contract strings (file names, config key names, etc.), define them as constants in one place
12
+
13
+ **Additional maintenance constraints:**
14
+ - Before implementation, classify planned changes as required, related, or unnecessary
15
+ - Implement only required and related changes
16
+ - Do not use a touched file as a reason to make style improvements, renames, file moves, hook return shape changes, comment deletions, or test expectation changes
17
+ - If the existing structure can satisfy the request, do not restructure only to match common style
18
+ - After implementation, inspect the full diff and revert unnecessary changes
19
+
20
+ **Maintenance Scope output contract (create at the start of implementation):**
21
+ ```markdown
22
+ # Maintenance Change Scope
23
+
24
+ ## Task
25
+ {One-line task summary}
26
+
27
+ ## Required Changes
28
+ | File | Reason | Requirement Mapping |
29
+ |------|--------|---------------------|
30
+ | {File} | {Reason} | {Mapped requirement} |
31
+
32
+ ## Related Changes
33
+ | File | Reason | Relation to Required Change |
34
+ |------|--------|-----------------------------|
35
+ | {File} | {Reason} | {Relation} |
36
+
37
+ ## Existing Contracts Preserved
38
+ | Contract | Target | Preservation |
39
+ |----------|--------|--------------|
40
+ | {Contract type} | {Target} | {What is preserved} |
41
+ ```
42
+
43
+ **Decisions output contract (at implementation completion, only if decisions were made):**
44
+ ```markdown
45
+ # Decision Log
46
+
47
+ ## 1. {Decision}
48
+ - **Context**: {Why the decision was needed}
49
+ - **Options considered**: {List of options}
50
+ - **Rationale**: {Reason for the choice}
51
+ ```
52
+
53
+ **Pre-completion self-check (required):**
54
+
55
+ Before running build and tests, audit your work against Policy with the following procedure.
56
+
57
+ 1. Open the Policy Source path with the Read tool and obtain the full content
58
+ 2. List every `##` section (do not cherry-pick)
59
+ 3. Match the REJECT criteria in each listed section against your implementation
60
+ 4. Inspect the full diff and check that no out-of-scope rename, move, comment deletion, UI copy change, accessible-name change, or test expectation change remains
61
+
62
+ **Required output (include headings)**
63
+ ## Work Results
64
+ - {Summary of actions taken}
65
+ ## Changes Made
66
+ - {Summary of required and related changes}
67
+ ## Reverted Unnecessary Changes
68
+ - {Changes reverted, or "none"}
69
+ ## Build Results
70
+ - {Build execution results}
71
+ ## Test Results
72
+ - {Test command executed and results}
@@ -0,0 +1,51 @@
1
+ Analyze the task as maintenance work for an existing frontend feature and produce a minimum-diff implementation plan that includes necessary design decisions.
2
+
3
+ **Note:** If Previous Response exists, treat it as a rework request and compare it with the current files before revising the plan.
4
+
5
+ **Small-task criteria:**
6
+ - Only 1-2 files change
7
+ - No design decision is needed
8
+ - No technology choice is needed
9
+
10
+ For small tasks, omit the design section. In maintenance work, do not omit existing-contract and unnecessary-change checks even for small tasks.
11
+
12
+ **Do:**
13
+ 1. **Read reference materials first (required)**
14
+ - Actually open files or directories listed in the task's reference-materials section with Read/Glob
15
+ - If a directory is listed, enumerate it and identify the relevant files before reading
16
+ - If reference materials do not exist or cannot be found, report that and do not substitute guesses
17
+ - **Do not use files not listed in the task as substitutes for reference materials**
18
+ 2. Understand the task requirements
19
+ - Compare reference materials with the current implementation to identify the delta
20
+ - **For each requirement, decide whether a change is needed. If no change is needed, cite the current code location (file:line). Do not say "already correct" without evidence**
21
+ - **Limit requirements to explicit requirements and directly implied requirements. Do not turn general best practices or future extensibility into requirements**
22
+ - **Break requirements down only to make them verifiable. Do not let decomposition create new requirements**
23
+ - **When using an implied requirement, identify the explicit requirement that supports it in the plan report**
24
+ 3. Inspect code to resolve unknowns
25
+ 4. Identify existing contracts that must be preserved
26
+ - Check existing structure, type names, hook return values, UI copy, accessible names, comments, and test expectations
27
+ - If an existing contract must change, document the reason and impact scope in the plan
28
+ 5. Classify candidate changes as required, related, or unnecessary
29
+ - Same file, nearby responsibility, or common style is not enough to make a change related
30
+ - Do not assign unnecessary changes to the Coder
31
+ 6. Decide file structure and design patterns when needed
32
+ - If the existing structure can satisfy the request, keep it even if it is not ideal
33
+ 7. Decide the implementation approach
34
+ - Check that the approach does not violate Knowledge or Policy constraints
35
+ - For user-facing additions or changes, fix the reachability condition, entry point, and activation path
36
+ 8. Include the following in the Coder guidance:
37
+ - Existing implementation patterns to follow (file:line). Always cite same-kind existing code when available
38
+ - Impact scope. Especially when adding a new parameter, list every call path that must be wired
39
+ - Relevant anti-patterns for this task, if any
40
+ - Existing contracts that must not change
41
+ - Candidate changes explicitly excluded as unnecessary
42
+
43
+ **Required output (include headings)**
44
+ ## Work Results
45
+ - {Plan summary}
46
+ ## Change Classification
47
+ - {Required, related, and unnecessary changes}
48
+ ## Existing Contracts
49
+ - {Existing contracts to preserve}
50
+ ## Implementation Plan
51
+ - {Minimum-diff plan}
@@ -0,0 +1,8 @@
1
+ Review the code diff.
2
+
3
+ Procedure:
4
+ 1. Review the task intent, plan, diff, and execution evidence
5
+ 2. Look for implementation bugs, regressions in existing behavior, security risks, and missing tests
6
+ 3. Include only issues caused by the current diff that the user should fix
7
+ 4. For each finding, include location, impact, and fix direction
8
+ 5. Do not report unsupported speculation, preference-only changes, or unrelated pre-existing issues
@@ -0,0 +1,110 @@
1
+ Review evidence from executed tests, builds, and manual verification, then make the final approval decision including whether any unnecessary maintenance diff remains.
2
+
3
+ Procedure:
4
+ 1. Open the Knowledge and Policy Source paths with the Read tool and obtain the full content
5
+ 2. List every `##` section from each source (do not cherry-pick)
6
+ 3. Match the criteria from the listed sections against the diff, execution evidence, and reports
7
+
8
+ ## Step-specific additional procedure
9
+
10
+ 1. Extract each requirement from the task instructions one by one
11
+ - If one sentence contains multiple conditions or paths, split it into the smallest verifiable units
12
+ - Split parallel expressions by default
13
+ 2. For each requirement, identify the implemented code (file:line)
14
+ 3. Actually verify that the code satisfies the requirement by reading files and checking build/test evidence
15
+ - Do not mark a compound requirement ✅ after checking only one side
16
+ - Do not trust plan or requirements-review judgments without independent verification per requirement
17
+ - REJECT if any single requirement is unsatisfied
18
+ 4. Validate the maintenance scope
19
+ - Check whether required, related, and unnecessary change classifications are valid
20
+ - Check that comments, type names, file placement, UI copy, accessible names, and test expectations did not change out of scope
21
+ - REJECT if any diff remains that is justified only by general quality improvement or style cleanup
22
+ 5. Re-evaluate prior review findings
23
+ - If a finding does not hold in the code, record it as false_positive
24
+ - If a valid finding is outside the task purpose or over-generalized, record it as overreach
25
+ - Do not silently pass through false_positive or overreach findings
26
+
27
+ ## Report priority (supervise-specific)
28
+
29
+ - Summary reports are not primary evidence. Primary evidence is execution-result reports, review reports with concrete checks, and actual code
30
+ - `Build Results` / `Test Results` inside execution-result reports may be treated as primary evidence
31
+ - In `architecture-review` / `qa-review` / `testing-review` / `security-review` / `requirements-review`, prioritize each report's verification-evidence section
32
+ - Treat a verification-evidence item as supporting evidence only when target, check content, and result are all present. Otherwise treat it as unverified
33
+ - When evidence conflicts, prefer `execution-result report > review report with concrete checks > summary report`
34
+
35
+ **Validation output contract:**
36
+ ```markdown
37
+ # Final Validation Result
38
+
39
+ ## Result: APPROVE / REJECT
40
+
41
+ ## Requirement Satisfaction Check
42
+
43
+ Extract requirements from the task instructions and verify each requirement against actual code.
44
+
45
+ | # | Requirement (from task instructions) | Satisfied | Evidence (file:line) |
46
+ |---|--------------------------------------|-----------|----------------------|
47
+ | 1 | {Requirement 1} | ✅/❌ | `src/file.ts:42` |
48
+ | 2 | {Requirement 2} | ✅/❌ | `src/file.ts:55` |
49
+
50
+ - Any ❌ requires REJECT
51
+ - ✅ without evidence is invalid
52
+ - Do not mark ✅ when only part of a compound case was checked
53
+ - Do not trust the plan report without independent verification per requirement
54
+
55
+ ## Maintenance Scope Check
56
+
57
+ | Check | Result | Evidence |
58
+ |-------|--------|----------|
59
+ | Only required changes remain | ✅/❌ | {Evidence} |
60
+ | Related changes have clear reasons | ✅/❌ | {Evidence} |
61
+ | No unnecessary changes remain | ✅/❌ | {Evidence} |
62
+ | No out-of-scope comment deletion occurred | ✅/❌ | {Evidence} |
63
+ | Type names, file placement, and public APIs did not change out of scope | ✅/❌ | {Evidence} |
64
+ | UI copy, accessible names, and test expectations did not change out of scope | ✅/❌ | {Evidence} |
65
+
66
+ ## Prior Finding Re-evaluation
67
+
68
+ | finding_id | Prior status | Re-evaluation | Evidence |
69
+ |------------|--------------|---------------|----------|
70
+ | {id} | new / persists / resolved | valid / false_positive / overreach | `src/file.ts:42`, `reports/plan.md` |
71
+
72
+ - If final judgment differs from prior review conclusions, write the reason with evidence
73
+ - When marking false_positive / overreach, state whether it is inappropriate relative to the task or the plan
74
+ - If overturning requirements-review, provide evidence-backed reasoning
75
+
76
+ ## Verification Summary
77
+ | Item | Status | Verification Method |
78
+ |------|--------|---------------------|
79
+ | Tests | ✅ / ⚠️ / ❌ | {Execution log, report, CI evidence} |
80
+ | Build | ✅ / ⚠️ / ❌ | {Execution log, report, CI evidence} |
81
+ | Manual verification | ✅ / ⚠️ / ❌ | {Evidence checked, or state not verified} |
82
+
83
+ ## Artifacts
84
+ - Created: {Created files}
85
+ - Modified: {Modified files}
86
+
87
+ ## Incomplete Items (for REJECT)
88
+ | # | Item | Reason |
89
+ |---|------|--------|
90
+ | 1 | {Item} | {Reason} |
91
+ ```
92
+
93
+ **Summary output contract (APPROVE only):**
94
+ ```markdown
95
+ # Task Completion Summary
96
+
97
+ ## Task
98
+ {Original request in 1-2 sentences}
99
+
100
+ ## Result
101
+ Complete
102
+
103
+ ## Changes
104
+ | Type | File | Summary |
105
+ |------|------|---------|
106
+ | Created | `src/file.ts` | Summary |
107
+
108
+ ## Verification Evidence
109
+ - {Test/build/manual verification evidence}
110
+ ```
@@ -6,14 +6,18 @@ Analyze the implementation task and, if decomposition is appropriate, split into
6
6
 
7
7
  1. Assess whether decomposition is appropriate
8
8
  - Identify files to change and check inter-file dependencies
9
- - If cross-cutting concerns exist (shared types, IDs, events), implement in a single part
9
+ - First look for parallelizable responsibility boundaries
10
+ - If cross-cutting concerns exist (shared types, IDs, events), consider staged work: foundation part -> consuming parts -> verification part
10
11
  - If few files are involved, or the task is a rename/refactoring, implement in a single part
12
+ - When parts.length === 1, first consider whether verification separation or staged work is possible
13
+ - Avoid oversized single parts such as "implementation and verification"
11
14
 
12
15
  2. If decomposing: group files by layer/module
13
16
  - Create groups based on high cohesion (e.g., Domain layer / Infrastructure layer / API layer)
14
17
  - If there are type or interface dependencies, keep both sides in the same group
15
18
  - Never assign the same file to multiple parts
16
19
  - Keep test files and implementation files in the same part
20
+ - Separate implementation parts from verification parts
17
21
 
18
22
  3. Assign file ownership exclusively to each part
19
23
  - Each part's instruction must clearly state:
@@ -24,6 +28,7 @@ Analyze the implementation task and, if decomposition is appropriate, split into
24
28
  - If tests are already written, instruct parts to implement so existing tests pass
25
29
  - Refer to Quality Gates and plan any required verification as a dedicated single verification part
26
30
  - Do not make parallel implementation parts run duplicate full-build or full-test checks
31
+ - Do not duplicate npm test / npm run test:e2e:mock in each implementation part
27
32
 
28
33
  **Constraints:**
29
34
  - If tests or build verification are needed, run them as a dedicated single verification part after dependent implementation parts are complete
@@ -24,6 +24,11 @@ Refer only to files within the Report Directory shown in the Workflow Context. D
24
24
  - Include tests that would catch implementations that incorrectly reuse a response envelope when reading requests
25
25
  - Write tests that are expected to pass after implementation is complete (build errors and test failures are expected at this stage)
26
26
 
27
+ **Non-executable asset constraints:**
28
+ - Do not create tests that freeze prose, headings, or structure in explanations, guides, README files, or Markdown documentation
29
+ - For docs-only changes, do not add tests unless an explicit executable contract exists
30
+ - Tests are only needed when assets contain contracts tied to code behavior or machine processing, such as CLI examples, config examples, or generated artifacts
31
+
27
32
  **Test execution:**
28
33
  - Run tests after creating them to check results
29
34
  - Test failures and import errors are expected before implementation (including imports of not-yet-implemented modules)
@@ -0,0 +1,45 @@
1
+ Write tests based on the plan before implementing production code, while protecting existing behavior.
2
+ Refer only to files within the Report Directory shown in the Workflow Context. Do not search or reference other report directories.
3
+
4
+ **Important: Do NOT create or modify production code. Only test files may be created.**
5
+
6
+ **Actions:**
7
+ 1. Review the plan report and separate behavior changed by the request from existing behavior that must not change
8
+ 2. Examine existing code and tests to learn the project's test patterns
9
+ 3. Add regression tests when existing contracts are not protected
10
+ 4. Write unit tests for the planned feature or fix
11
+ 5. Determine whether integration tests are needed and create them if so
12
+ - Does the data flow cross 3+ modules?
13
+ - Does a new status/state merge into an existing workflow?
14
+ - Does a new option propagate through a call chain to the endpoint?
15
+ - If any apply, create integration tests
16
+
17
+ **Test writing guidelines:**
18
+ - Follow the project's existing test patterns (naming conventions, directory structure, helpers)
19
+ - Write tests in Given-When-Then structure
20
+ - One concept per test. Do not mix multiple concerns in a single test
21
+ - Cover happy path, error cases, boundary values, and edge cases
22
+ - Do not weaken existing expectations for implementation convenience
23
+ - When an external contract exists, include tests that use the contract-defined input location
24
+ - Example: pass request bodies using the defined root shape as-is
25
+ - Example: keep query / path parameters in their defined location instead of moving them into the body
26
+ - Include tests that would catch implementations that incorrectly reuse a response envelope when reading requests
27
+ - Write tests that are expected to pass after implementation is complete (build errors and test failures are expected at this stage)
28
+
29
+ **Non-executable asset constraints:**
30
+ - Do not create tests that freeze prose, headings, or structure in explanations, guides, README files, or Markdown documentation
31
+ - For docs-only changes, do not add tests unless an explicit executable contract exists
32
+ - Tests are only needed when assets contain contracts tied to code behavior or machine processing, such as CLI examples, config examples, or generated artifacts
33
+
34
+ **Test execution:**
35
+ - Run tests after creating them to check results
36
+ - Test failures and import errors are expected before implementation (including imports of not-yet-implemented modules)
37
+ - Fix errors that will persist after implementation, such as wrong import paths for existing modules
38
+
39
+ **Required output (include headings)**
40
+ ## Work Results
41
+ - {Summary of created or updated tests}
42
+ ## Protected Existing Contracts
43
+ - {Existing behavior protected by tests}
44
+ ## Test Results
45
+ - {Command and result if run, or reason if not run}