takt 0.19.0 → 0.20.1

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 (337) hide show
  1. package/README.md +112 -801
  2. package/builtins/en/config.yaml +72 -86
  3. package/builtins/ja/config.yaml +72 -86
  4. package/dist/agents/runner.d.ts.map +1 -1
  5. package/dist/agents/runner.js +12 -23
  6. package/dist/agents/runner.js.map +1 -1
  7. package/dist/app/cli/commands.d.ts +1 -1
  8. package/dist/app/cli/commands.js +47 -13
  9. package/dist/app/cli/commands.js.map +1 -1
  10. package/dist/app/cli/program.d.ts.map +1 -1
  11. package/dist/app/cli/program.js +4 -3
  12. package/dist/app/cli/program.js.map +1 -1
  13. package/dist/app/cli/routing.d.ts.map +1 -1
  14. package/dist/app/cli/routing.js +19 -16
  15. package/dist/app/cli/routing.js.map +1 -1
  16. package/dist/core/models/global-config.d.ts +12 -2
  17. package/dist/core/models/global-config.d.ts.map +1 -1
  18. package/dist/core/models/schemas.d.ts +12 -16
  19. package/dist/core/models/schemas.d.ts.map +1 -1
  20. package/dist/core/models/schemas.js +9 -2
  21. package/dist/core/models/schemas.js.map +1 -1
  22. package/dist/core/piece/engine/OptionsBuilder.d.ts.map +1 -1
  23. package/dist/core/piece/engine/OptionsBuilder.js +22 -5
  24. package/dist/core/piece/engine/OptionsBuilder.js.map +1 -1
  25. package/dist/core/piece/instruction/InstructionBuilder.d.ts +3 -0
  26. package/dist/core/piece/instruction/InstructionBuilder.d.ts.map +1 -1
  27. package/dist/core/piece/instruction/InstructionBuilder.js +7 -33
  28. package/dist/core/piece/instruction/InstructionBuilder.js.map +1 -1
  29. package/dist/core/piece/instruction/escape.d.ts +4 -4
  30. package/dist/core/piece/instruction/escape.d.ts.map +1 -1
  31. package/dist/core/piece/instruction/escape.js +5 -6
  32. package/dist/core/piece/instruction/escape.js.map +1 -1
  33. package/dist/core/piece/types.d.ts +6 -9
  34. package/dist/core/piece/types.d.ts.map +1 -1
  35. package/dist/faceted-prompting/compose.d.ts +18 -0
  36. package/dist/faceted-prompting/compose.d.ts.map +1 -0
  37. package/dist/faceted-prompting/compose.js +45 -0
  38. package/dist/faceted-prompting/compose.js.map +1 -0
  39. package/dist/faceted-prompting/data-engine.d.ts +49 -0
  40. package/dist/faceted-prompting/data-engine.d.ts.map +1 -0
  41. package/dist/faceted-prompting/data-engine.js +85 -0
  42. package/dist/faceted-prompting/data-engine.js.map +1 -0
  43. package/dist/faceted-prompting/escape.d.ts +14 -0
  44. package/dist/faceted-prompting/escape.d.ts.map +1 -0
  45. package/dist/faceted-prompting/escape.js +16 -0
  46. package/dist/faceted-prompting/escape.js.map +1 -0
  47. package/dist/faceted-prompting/index.d.ts +16 -0
  48. package/dist/faceted-prompting/index.d.ts.map +1 -0
  49. package/dist/faceted-prompting/index.js +17 -0
  50. package/dist/faceted-prompting/index.js.map +1 -0
  51. package/dist/faceted-prompting/resolve.d.ts +73 -0
  52. package/dist/faceted-prompting/resolve.d.ts.map +1 -0
  53. package/dist/faceted-prompting/resolve.js +160 -0
  54. package/dist/faceted-prompting/resolve.js.map +1 -0
  55. package/dist/faceted-prompting/template.d.ts +27 -0
  56. package/dist/faceted-prompting/template.d.ts.map +1 -0
  57. package/dist/faceted-prompting/template.js +49 -0
  58. package/dist/faceted-prompting/template.js.map +1 -0
  59. package/dist/faceted-prompting/truncation.d.ts +36 -0
  60. package/dist/faceted-prompting/truncation.d.ts.map +1 -0
  61. package/dist/faceted-prompting/truncation.js +63 -0
  62. package/dist/faceted-prompting/truncation.js.map +1 -0
  63. package/dist/faceted-prompting/types.d.ts +44 -0
  64. package/dist/faceted-prompting/types.d.ts.map +1 -0
  65. package/dist/faceted-prompting/types.js +10 -0
  66. package/dist/faceted-prompting/types.js.map +1 -0
  67. package/dist/features/analytics/events.d.ts +54 -0
  68. package/dist/features/analytics/events.d.ts.map +1 -0
  69. package/dist/features/analytics/events.js +8 -0
  70. package/dist/features/analytics/events.js.map +1 -0
  71. package/dist/features/analytics/index.d.ts +9 -0
  72. package/dist/features/analytics/index.d.ts.map +1 -0
  73. package/dist/features/analytics/index.js +8 -0
  74. package/dist/features/analytics/index.js.map +1 -0
  75. package/dist/features/analytics/metrics.d.ts +35 -0
  76. package/dist/features/analytics/metrics.d.ts.map +1 -0
  77. package/dist/features/analytics/metrics.js +178 -0
  78. package/dist/features/analytics/metrics.js.map +1 -0
  79. package/dist/features/analytics/purge.d.ts +15 -0
  80. package/dist/features/analytics/purge.d.ts.map +1 -0
  81. package/dist/features/analytics/purge.js +38 -0
  82. package/dist/features/analytics/purge.js.map +1 -0
  83. package/dist/features/analytics/report-parser.d.ts +21 -0
  84. package/dist/features/analytics/report-parser.d.ts.map +1 -0
  85. package/dist/features/analytics/report-parser.js +140 -0
  86. package/dist/features/analytics/report-parser.js.map +1 -0
  87. package/dist/features/analytics/writer.d.ts +29 -0
  88. package/dist/features/analytics/writer.d.ts.map +1 -0
  89. package/dist/features/analytics/writer.js +65 -0
  90. package/dist/features/analytics/writer.js.map +1 -0
  91. package/dist/features/catalog/catalogFacets.d.ts.map +1 -1
  92. package/dist/features/catalog/catalogFacets.js +4 -3
  93. package/dist/features/catalog/catalogFacets.js.map +1 -1
  94. package/dist/features/config/index.d.ts +1 -1
  95. package/dist/features/config/index.d.ts.map +1 -1
  96. package/dist/features/config/index.js +1 -1
  97. package/dist/features/config/index.js.map +1 -1
  98. package/dist/features/config/resetCategories.d.ts +1 -1
  99. package/dist/features/config/resetCategories.d.ts.map +1 -1
  100. package/dist/features/config/resetCategories.js +3 -3
  101. package/dist/features/config/resetCategories.js.map +1 -1
  102. package/dist/features/config/resetConfig.d.ts +2 -0
  103. package/dist/features/config/resetConfig.d.ts.map +1 -0
  104. package/dist/features/config/resetConfig.js +12 -0
  105. package/dist/features/config/resetConfig.js.map +1 -0
  106. package/dist/features/config/switchPiece.js +2 -2
  107. package/dist/features/config/switchPiece.js.map +1 -1
  108. package/dist/features/interactive/aiCaller.d.ts +34 -0
  109. package/dist/features/interactive/aiCaller.d.ts.map +1 -0
  110. package/dist/features/interactive/aiCaller.js +93 -0
  111. package/dist/features/interactive/aiCaller.js.map +1 -0
  112. package/dist/features/interactive/conversationLoop.d.ts +10 -29
  113. package/dist/features/interactive/conversationLoop.d.ts.map +1 -1
  114. package/dist/features/interactive/conversationLoop.js +39 -91
  115. package/dist/features/interactive/conversationLoop.js.map +1 -1
  116. package/dist/features/interactive/index.d.ts +2 -1
  117. package/dist/features/interactive/index.d.ts.map +1 -1
  118. package/dist/features/interactive/index.js +2 -1
  119. package/dist/features/interactive/index.js.map +1 -1
  120. package/dist/features/interactive/interactive-summary.d.ts +23 -1
  121. package/dist/features/interactive/interactive-summary.d.ts.map +1 -1
  122. package/dist/features/interactive/interactive-summary.js +29 -2
  123. package/dist/features/interactive/interactive-summary.js.map +1 -1
  124. package/dist/features/interactive/interactive.d.ts +1 -0
  125. package/dist/features/interactive/interactive.d.ts.map +1 -1
  126. package/dist/features/interactive/interactive.js.map +1 -1
  127. package/dist/features/interactive/orderReader.d.ts +17 -0
  128. package/dist/features/interactive/orderReader.d.ts.map +1 -0
  129. package/dist/features/interactive/orderReader.js +50 -0
  130. package/dist/features/interactive/orderReader.js.map +1 -0
  131. package/dist/features/interactive/retryMode.d.ts +3 -2
  132. package/dist/features/interactive/retryMode.d.ts.map +1 -1
  133. package/dist/features/interactive/retryMode.js +13 -18
  134. package/dist/features/interactive/retryMode.js.map +1 -1
  135. package/dist/features/interactive/runSessionReader.d.ts +9 -0
  136. package/dist/features/interactive/runSessionReader.d.ts.map +1 -1
  137. package/dist/features/interactive/runSessionReader.js +19 -0
  138. package/dist/features/interactive/runSessionReader.js.map +1 -1
  139. package/dist/features/pieceSelection/index.d.ts.map +1 -1
  140. package/dist/features/pieceSelection/index.js +7 -19
  141. package/dist/features/pieceSelection/index.js.map +1 -1
  142. package/dist/features/pipeline/execute.js +2 -2
  143. package/dist/features/pipeline/execute.js.map +1 -1
  144. package/dist/features/prompt/preview.d.ts.map +1 -1
  145. package/dist/features/prompt/preview.js +3 -4
  146. package/dist/features/prompt/preview.js.map +1 -1
  147. package/dist/features/tasks/add/index.d.ts.map +1 -1
  148. package/dist/features/tasks/add/index.js +11 -6
  149. package/dist/features/tasks/add/index.js.map +1 -1
  150. package/dist/features/tasks/execute/parallelExecution.js +11 -2
  151. package/dist/features/tasks/execute/parallelExecution.js.map +1 -1
  152. package/dist/features/tasks/execute/pieceExecution.d.ts.map +1 -1
  153. package/dist/features/tasks/execute/pieceExecution.js +64 -9
  154. package/dist/features/tasks/execute/pieceExecution.js.map +1 -1
  155. package/dist/features/tasks/execute/postExecution.d.ts +1 -1
  156. package/dist/features/tasks/execute/postExecution.d.ts.map +1 -1
  157. package/dist/features/tasks/execute/postExecution.js +32 -18
  158. package/dist/features/tasks/execute/postExecution.js.map +1 -1
  159. package/dist/features/tasks/execute/resolveTask.d.ts.map +1 -1
  160. package/dist/features/tasks/execute/resolveTask.js +3 -4
  161. package/dist/features/tasks/execute/resolveTask.js.map +1 -1
  162. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  163. package/dist/features/tasks/execute/selectAndExecute.js +4 -3
  164. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  165. package/dist/features/tasks/execute/session.js +2 -2
  166. package/dist/features/tasks/execute/session.js.map +1 -1
  167. package/dist/features/tasks/execute/taskExecution.d.ts +1 -0
  168. package/dist/features/tasks/execute/taskExecution.d.ts.map +1 -1
  169. package/dist/features/tasks/execute/taskExecution.js +19 -13
  170. package/dist/features/tasks/execute/taskExecution.js.map +1 -1
  171. package/dist/features/tasks/execute/types.d.ts +10 -8
  172. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  173. package/dist/features/tasks/list/index.js +2 -2
  174. package/dist/features/tasks/list/index.js.map +1 -1
  175. package/dist/features/tasks/list/instructMode.d.ts +1 -1
  176. package/dist/features/tasks/list/instructMode.d.ts.map +1 -1
  177. package/dist/features/tasks/list/instructMode.js +13 -17
  178. package/dist/features/tasks/list/instructMode.js.map +1 -1
  179. package/dist/features/tasks/list/listNonInteractive.js +2 -2
  180. package/dist/features/tasks/list/listNonInteractive.js.map +1 -1
  181. package/dist/features/tasks/list/taskInstructionActions.d.ts.map +1 -1
  182. package/dist/features/tasks/list/taskInstructionActions.js +6 -4
  183. package/dist/features/tasks/list/taskInstructionActions.js.map +1 -1
  184. package/dist/features/tasks/list/taskRetryActions.d.ts.map +1 -1
  185. package/dist/features/tasks/list/taskRetryActions.js +10 -8
  186. package/dist/features/tasks/list/taskRetryActions.js.map +1 -1
  187. package/dist/features/tasks/list/taskStatusLabel.d.ts +1 -0
  188. package/dist/features/tasks/list/taskStatusLabel.d.ts.map +1 -1
  189. package/dist/features/tasks/list/taskStatusLabel.js +13 -1
  190. package/dist/features/tasks/list/taskStatusLabel.js.map +1 -1
  191. package/dist/features/tasks/watch/index.d.ts.map +1 -1
  192. package/dist/features/tasks/watch/index.js +2 -3
  193. package/dist/features/tasks/watch/index.js.map +1 -1
  194. package/dist/index.d.ts +2 -1
  195. package/dist/index.d.ts.map +1 -1
  196. package/dist/index.js +2 -1
  197. package/dist/index.js.map +1 -1
  198. package/dist/infra/claude/types.d.ts +2 -2
  199. package/dist/infra/claude/types.d.ts.map +1 -1
  200. package/dist/infra/config/env/config-env-overrides.d.ts +4 -0
  201. package/dist/infra/config/env/config-env-overrides.d.ts.map +1 -0
  202. package/dist/infra/config/env/config-env-overrides.js +134 -0
  203. package/dist/infra/config/env/config-env-overrides.js.map +1 -0
  204. package/dist/infra/config/global/globalConfig.d.ts.map +1 -1
  205. package/dist/infra/config/global/globalConfig.js +38 -26
  206. package/dist/infra/config/global/globalConfig.js.map +1 -1
  207. package/dist/infra/config/global/index.d.ts +1 -0
  208. package/dist/infra/config/global/index.d.ts.map +1 -1
  209. package/dist/infra/config/global/index.js +1 -0
  210. package/dist/infra/config/global/index.js.map +1 -1
  211. package/dist/infra/config/global/pieceCategories.d.ts +2 -2
  212. package/dist/infra/config/global/pieceCategories.d.ts.map +1 -1
  213. package/dist/infra/config/global/pieceCategories.js +7 -7
  214. package/dist/infra/config/global/pieceCategories.js.map +1 -1
  215. package/dist/infra/config/global/resetConfig.d.ts +8 -0
  216. package/dist/infra/config/global/resetConfig.d.ts.map +1 -0
  217. package/dist/infra/config/global/resetConfig.js +62 -0
  218. package/dist/infra/config/global/resetConfig.js.map +1 -0
  219. package/dist/infra/config/index.d.ts +2 -0
  220. package/dist/infra/config/index.d.ts.map +1 -1
  221. package/dist/infra/config/index.js +2 -0
  222. package/dist/infra/config/index.js.map +1 -1
  223. package/dist/infra/config/loadConfig.d.ts +12 -0
  224. package/dist/infra/config/loadConfig.d.ts.map +1 -0
  225. package/dist/infra/config/loadConfig.js +91 -0
  226. package/dist/infra/config/loadConfig.js.map +1 -0
  227. package/dist/infra/config/loaders/agentLoader.d.ts +2 -2
  228. package/dist/infra/config/loaders/agentLoader.d.ts.map +1 -1
  229. package/dist/infra/config/loaders/agentLoader.js +7 -7
  230. package/dist/infra/config/loaders/agentLoader.js.map +1 -1
  231. package/dist/infra/config/loaders/index.d.ts +1 -1
  232. package/dist/infra/config/loaders/index.d.ts.map +1 -1
  233. package/dist/infra/config/loaders/index.js +1 -1
  234. package/dist/infra/config/loaders/index.js.map +1 -1
  235. package/dist/infra/config/loaders/pieceCategories.d.ts +6 -4
  236. package/dist/infra/config/loaders/pieceCategories.d.ts.map +1 -1
  237. package/dist/infra/config/loaders/pieceCategories.js +30 -44
  238. package/dist/infra/config/loaders/pieceCategories.js.map +1 -1
  239. package/dist/infra/config/loaders/pieceParser.d.ts +2 -2
  240. package/dist/infra/config/loaders/pieceParser.d.ts.map +1 -1
  241. package/dist/infra/config/loaders/pieceParser.js +3 -3
  242. package/dist/infra/config/loaders/pieceParser.js.map +1 -1
  243. package/dist/infra/config/loaders/pieceResolver.d.ts +2 -2
  244. package/dist/infra/config/loaders/pieceResolver.d.ts.map +1 -1
  245. package/dist/infra/config/loaders/pieceResolver.js +13 -10
  246. package/dist/infra/config/loaders/pieceResolver.js.map +1 -1
  247. package/dist/infra/config/loaders/resource-resolver.d.ts +8 -35
  248. package/dist/infra/config/loaders/resource-resolver.d.ts.map +1 -1
  249. package/dist/infra/config/loaders/resource-resolver.js +29 -120
  250. package/dist/infra/config/loaders/resource-resolver.js.map +1 -1
  251. package/dist/infra/config/paths.d.ts +5 -2
  252. package/dist/infra/config/paths.d.ts.map +1 -1
  253. package/dist/infra/config/paths.js +2 -1
  254. package/dist/infra/config/paths.js.map +1 -1
  255. package/dist/infra/config/project/index.d.ts +2 -1
  256. package/dist/infra/config/project/index.d.ts.map +1 -1
  257. package/dist/infra/config/project/index.js +2 -1
  258. package/dist/infra/config/project/index.js.map +1 -1
  259. package/dist/infra/config/project/projectConfig.d.ts +2 -10
  260. package/dist/infra/config/project/projectConfig.d.ts.map +1 -1
  261. package/dist/infra/config/project/projectConfig.js +20 -29
  262. package/dist/infra/config/project/projectConfig.js.map +1 -1
  263. package/dist/infra/config/project/resolvedSettings.d.ts +2 -0
  264. package/dist/infra/config/project/resolvedSettings.d.ts.map +1 -0
  265. package/dist/infra/config/project/resolvedSettings.js +29 -0
  266. package/dist/infra/config/project/resolvedSettings.js.map +1 -0
  267. package/dist/infra/config/resolveConfigValue.d.ts +5 -0
  268. package/dist/infra/config/resolveConfigValue.d.ts.map +1 -0
  269. package/dist/infra/config/resolveConfigValue.js +13 -0
  270. package/dist/infra/config/resolveConfigValue.js.map +1 -0
  271. package/dist/infra/config/resolvePieceConfigValue.d.ts +5 -0
  272. package/dist/infra/config/resolvePieceConfigValue.d.ts.map +1 -0
  273. package/dist/infra/config/resolvePieceConfigValue.js +8 -0
  274. package/dist/infra/config/resolvePieceConfigValue.js.map +1 -0
  275. package/dist/infra/config/types.d.ts +5 -17
  276. package/dist/infra/config/types.d.ts.map +1 -1
  277. package/dist/infra/github/index.d.ts +2 -1
  278. package/dist/infra/github/index.d.ts.map +1 -1
  279. package/dist/infra/github/index.js +1 -1
  280. package/dist/infra/github/index.js.map +1 -1
  281. package/dist/infra/github/pr.d.ts +13 -0
  282. package/dist/infra/github/pr.d.ts.map +1 -1
  283. package/dist/infra/github/pr.js +39 -0
  284. package/dist/infra/github/pr.js.map +1 -1
  285. package/dist/infra/task/clone.js +9 -9
  286. package/dist/infra/task/clone.js.map +1 -1
  287. package/dist/infra/task/mapper.d.ts.map +1 -1
  288. package/dist/infra/task/mapper.js +3 -3
  289. package/dist/infra/task/mapper.js.map +1 -1
  290. package/dist/infra/task/naming.d.ts +0 -1
  291. package/dist/infra/task/naming.d.ts.map +1 -1
  292. package/dist/infra/task/naming.js +0 -12
  293. package/dist/infra/task/naming.js.map +1 -1
  294. package/dist/infra/task/runner.d.ts +2 -0
  295. package/dist/infra/task/runner.d.ts.map +1 -1
  296. package/dist/infra/task/runner.js.map +1 -1
  297. package/dist/infra/task/schema.d.ts +4 -0
  298. package/dist/infra/task/schema.d.ts.map +1 -1
  299. package/dist/infra/task/schema.js +2 -0
  300. package/dist/infra/task/schema.js.map +1 -1
  301. package/dist/infra/task/summarize.d.ts.map +1 -1
  302. package/dist/infra/task/summarize.js +5 -19
  303. package/dist/infra/task/summarize.js.map +1 -1
  304. package/dist/infra/task/taskLifecycleService.d.ts +2 -0
  305. package/dist/infra/task/taskLifecycleService.d.ts.map +1 -1
  306. package/dist/infra/task/taskLifecycleService.js +8 -4
  307. package/dist/infra/task/taskLifecycleService.js.map +1 -1
  308. package/dist/infra/task/types.d.ts +2 -0
  309. package/dist/infra/task/types.d.ts.map +1 -1
  310. package/dist/shared/i18n/labels_en.yaml +6 -3
  311. package/dist/shared/i18n/labels_ja.yaml +6 -3
  312. package/dist/shared/prompts/en/score_instruct_system_prompt.md +9 -1
  313. package/dist/shared/prompts/en/score_retry_system_prompt.md +9 -1
  314. package/dist/shared/prompts/index.d.ts +4 -4
  315. package/dist/shared/prompts/index.d.ts.map +1 -1
  316. package/dist/shared/prompts/index.js +5 -43
  317. package/dist/shared/prompts/index.js.map +1 -1
  318. package/dist/shared/prompts/ja/score_instruct_system_prompt.md +9 -1
  319. package/dist/shared/prompts/ja/score_retry_system_prompt.md +9 -1
  320. package/dist/shared/ui/TaskPrefixWriter.d.ts +4 -0
  321. package/dist/shared/ui/TaskPrefixWriter.d.ts.map +1 -1
  322. package/dist/shared/ui/TaskPrefixWriter.js +2 -1
  323. package/dist/shared/ui/TaskPrefixWriter.js.map +1 -1
  324. package/dist/shared/utils/reportDir.d.ts.map +1 -1
  325. package/dist/shared/utils/reportDir.js +2 -6
  326. package/dist/shared/utils/reportDir.js.map +1 -1
  327. package/dist/shared/utils/slug.d.ts +2 -2
  328. package/dist/shared/utils/slug.d.ts.map +1 -1
  329. package/dist/shared/utils/slug.js +5 -4
  330. package/dist/shared/utils/slug.js.map +1 -1
  331. package/dist/shared/utils/taskPaths.js +1 -1
  332. package/dist/shared/utils/taskPaths.js.map +1 -1
  333. package/package.json +3 -3
  334. package/dist/features/config/switchConfig.d.ts +0 -33
  335. package/dist/features/config/switchConfig.d.ts.map +0 -1
  336. package/dist/features/config/switchConfig.js +0 -103
  337. package/dist/features/config/switchConfig.js.map +0 -1
package/README.md CHANGED
@@ -2,117 +2,42 @@
2
2
 
3
3
  🇯🇵 [日本語ドキュメント](./docs/README.ja.md)
4
4
 
5
- **T**AKT **A**gent **K**oordination **T**opology - Define how AI agents coordinate, where humans intervene, and what gets recorded in YAML
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.
6
6
 
7
- TAKT runs multiple AI agents (Claude Code, Codex, OpenCode) through YAML-defined workflows. Each step who runs, what they see, what's allowed, what happens on failure is declared in a piece file, not left to the agent.
7
+ TAKT runs AI agents (Claude Code, Codex, OpenCode) 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 piece files.
8
8
 
9
9
  TAKT is built with TAKT itself (dogfooding).
10
10
 
11
- ## Metaphor
12
-
13
- TAKT uses a music metaphor to describe orchestration:
14
-
15
- - **Piece**: A task execution definition (what to do and how agents coordinate)
16
- - **Movement**: A step inside a piece (a single stage in the flow)
17
- - **Orchestration**: The engine that coordinates agents across movements
18
-
19
- You can read every term as standard workflow language (piece = workflow, movement = step), but the metaphor is used to keep the system conceptually consistent.
20
-
21
11
  ## Why TAKT
22
12
 
23
- - AI agents are powerful but non-deterministic TAKT makes their decisions visible and replayable
24
- - Multi-agent coordination needs structure — pieces define who does what, in what order, with what permissions
25
- - CI/CD integration needs guardrails — pipeline mode runs agents non-interactively with full audit logs
13
+ **Batteries included** — Architecture, security, and AI antipattern review criteria are built in. Ship code that meets a quality bar from day one.
26
14
 
27
- ## What TAKT Controls and Manages
15
+ **Practical** A tool for daily development, not demos. Talk to AI to refine requirements, queue tasks, and run them. Automatic worktree isolation, PR creation, and retry on failure.
28
16
 
29
- TAKT **controls** agent execution and **manages** prompt components.
17
+ **Reproducible** Execution paths are declared in YAML, keeping results consistent. Pieces 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.
30
18
 
31
- | | Concern | Description |
32
- |---|---------|-------------|
33
- | Control | **Routing** | State transition rules (who runs when) |
34
- | Control | **Tools & Permissions** | Readonly, edit, full access (what's allowed) |
35
- | Control | **Recording** | Session logs, reports (what gets captured) |
36
- | Manage | **Personas** | Agent roles and expertise (who they act as) |
37
- | Manage | **Policies** | Coding standards, quality criteria, prohibitions (what to uphold) |
38
- | Manage | **Knowledge** | Domain knowledge, architecture info (what to reference) |
39
-
40
- Personas, policies, and knowledge are managed as independent files and freely combined across workflows ([Faceted Prompting](./docs/faceted-prompting.md)). Change a policy in one file and every workflow using it gets the update.
41
-
42
- ## What TAKT is NOT
43
-
44
- - **Not an autonomous engineer** — TAKT coordinates agents but doesn't decide what to build. You provide the task, TAKT governs the execution.
45
- - **Not a Skill or Swarm replacement** — Skills extend a single agent's knowledge. Swarm parallelizes agents. TAKT defines the workflow structure across agents — which agent runs, in what order, with what rules.
46
- - **Not fully automatic by default** — Every step can require human approval. Automation is opt-in (pipeline mode), not the default.
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)).
47
20
 
48
21
  ## Requirements
49
22
 
50
23
  Choose one:
51
24
 
52
- - **Use provider CLIs**: [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), or [OpenCode](https://opencode.ai) installed
53
- - **Use direct API**: **Anthropic API Key**, **OpenAI API Key**, or **OpenCode API Key** (no CLI required)
25
+ - **Provider CLIs**: [Claude Code](https://docs.anthropic.com/en/docs/claude-code), [Codex](https://github.com/openai/codex), or [OpenCode](https://opencode.ai) installed
26
+ - **Direct API**: Anthropic / OpenAI / OpenCode API Key (no CLI required)
54
27
 
55
- Additionally required:
28
+ Optional:
56
29
 
57
- - [GitHub CLI](https://cli.github.com/) (`gh`) — Only needed for `takt #N` (GitHub Issue execution)
30
+ - [GitHub CLI](https://cli.github.com/) (`gh`) — for `takt #N` (GitHub Issue tasks)
58
31
 
59
- **Pricing Note**: When using API Keys, TAKT directly calls the Claude API (Anthropic), OpenAI API, or OpenCode API. The pricing structure is the same as using the respective CLI tools. Be mindful of costs, especially when running automated tasks in CI/CD environments, as API usage can accumulate.
32
+ ## Quick Start
60
33
 
61
- ## Installation
34
+ ### Install
62
35
 
63
36
  ```bash
64
37
  npm install -g takt
65
38
  ```
66
39
 
67
- ## Quick Start
68
-
69
- ```bash
70
- # Interactive mode - refine task requirements with AI, then execute
71
- takt
72
-
73
- # Execute GitHub Issue as task (both work the same)
74
- takt #6
75
- takt --issue 6
76
-
77
- # Pipeline execution (non-interactive, for scripts/CI)
78
- takt --pipeline --task "Fix the bug" --auto-pr
79
- ```
80
-
81
- ## Usage
82
-
83
- ### Interactive Mode
84
-
85
- A mode where you refine task content through conversation with AI before execution. Useful when task requirements are ambiguous or when you want to clarify content while consulting with AI.
86
-
87
- ```bash
88
- # Start interactive mode (no arguments)
89
- takt
90
-
91
- # Specify initial message (short word only)
92
- takt hello
93
- ```
94
-
95
- **Note:** `--task` option skips interactive mode and executes the task directly. Issue references (`#6`, `--issue`) are used as initial input in interactive mode.
96
-
97
- **Flow:**
98
- 1. Select piece
99
- 2. Select interactive mode (assistant / persona / quiet / passthrough)
100
- 3. Refine task content through conversation with AI
101
- 4. Finalize task instructions with `/go` (you can also add additional instructions like `/go additional instructions`), or use `/play <task>` to execute a task immediately
102
- 5. Execute (create worktree, run piece, create PR)
103
-
104
- #### Interactive Mode Variants
105
-
106
- | Mode | Description |
107
- |------|-------------|
108
- | `assistant` | Default. AI asks clarifying questions before generating task instructions. |
109
- | `persona` | Conversation with the first movement's persona (uses its system prompt and tools). |
110
- | `quiet` | Generates task instructions without asking questions (best-effort). |
111
- | `passthrough` | Passes user input directly as task text without AI processing. |
112
-
113
- Pieces can set a default mode via the `interactive_mode` field in YAML.
114
-
115
- #### Execution Example
40
+ ### Talk to AI, then execute
116
41
 
117
42
  ```
118
43
  $ takt
@@ -121,748 +46,190 @@ Select piece:
121
46
  ❯ 🎼 default (current)
122
47
  📁 Development/
123
48
  📁 Research/
124
- Cancel
125
-
126
- Interactive mode - Enter task content. Commands: /go (execute), /cancel (exit)
127
49
 
128
- > I want to add user authentication feature
50
+ > Add user authentication with JWT
129
51
 
130
- [AI confirms and organizes requirements]
52
+ [AI clarifies requirements and organizes the task]
131
53
 
132
54
  > /go
133
-
134
- Proposed task instructions:
135
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
136
- Implement user authentication feature.
137
-
138
- Requirements:
139
- - Login with email address and password
140
- - JWT token-based authentication
141
- - Password hashing (bcrypt)
142
- - Login/logout API endpoints
143
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
144
-
145
- Proceed with these task instructions? (Y/n) y
146
-
147
- ? Create worktree? (Y/n) y
148
-
149
- [Piece execution starts...]
150
- ```
151
-
152
- ### Direct Task Execution
153
-
154
- Use the `--task` option to skip interactive mode and execute directly.
155
-
156
- ```bash
157
- # Specify task content with --task option
158
- takt --task "Fix bug"
159
-
160
- # Specify piece
161
- takt --task "Add authentication" --piece expert
162
-
163
- # Auto-create PR
164
- takt --task "Fix bug" --auto-pr
165
55
  ```
166
56
 
167
- **Note:** Passing a string as an argument (e.g., `takt "Add login feature"`) enters interactive mode with it as the initial message.
57
+ TAKT creates an isolated worktree, runs the piece (plan implement review → fix loop), and offers to create a PR when done.
168
58
 
169
- ### GitHub Issue Tasks
59
+ ### Queue tasks, then batch execute
170
60
 
171
- You can execute GitHub Issues directly as tasks. Issue title, body, labels, and comments are automatically incorporated as task content.
61
+ Use `takt` to queue multiple tasks, then execute them all at once:
172
62
 
173
63
  ```bash
174
- # Execute by specifying issue number
175
- takt #6
176
- takt --issue 6
177
-
178
- # Issue + piece specification
179
- takt #6 --piece expert
180
-
181
- # Issue + auto-create PR
182
- takt #6 --auto-pr
183
- ```
184
-
185
- **Requirements:** [GitHub CLI](https://cli.github.com/) (`gh`) must be installed and authenticated.
186
-
187
- ### Task Management (add / run / watch / list)
188
-
189
- Batch processing using `.takt/tasks.yaml` with task directories under `.takt/tasks/{slug}/`. Useful for accumulating multiple tasks and executing them together later.
190
-
191
- #### Add Task (`takt add`)
192
-
193
- ```bash
194
- # Refine task requirements through AI conversation, then add task
195
- takt add
196
-
197
- # Add task from GitHub Issue (issue number reflected in branch name)
198
- takt add #28
199
- ```
64
+ # Queue tasks through conversation
65
+ takt
66
+ > Refactor the auth module
67
+ > /go # queues the task
200
68
 
201
- #### Execute Tasks (`takt run`)
69
+ # Or queue from GitHub Issues
70
+ takt add #6
71
+ takt add #12
202
72
 
203
- ```bash
204
- # Execute all pending tasks in .takt/tasks.yaml
73
+ # Execute all pending tasks
205
74
  takt run
206
75
  ```
207
76
 
208
- #### Watch Tasks (`takt watch`)
209
-
210
- ```bash
211
- # Monitor .takt/tasks.yaml and auto-execute tasks (resident process)
212
- takt watch
213
- ```
214
-
215
- #### List Task Branches (`takt list`)
77
+ ### Manage results
216
78
 
217
79
  ```bash
218
- # List task branches (merge/delete)
80
+ # List completed/failed task branches merge, retry, or delete
219
81
  takt list
220
-
221
- # Non-interactive mode (for CI/scripts)
222
- takt list --non-interactive
223
- takt list --non-interactive --action diff --branch takt/my-branch
224
- takt list --non-interactive --action delete --branch takt/my-branch --yes
225
- takt list --non-interactive --format json
226
82
  ```
227
83
 
228
- #### Task Directory Workflow (Create / Run / Verify)
84
+ ## How It Works
229
85
 
230
- 1. Run `takt add` and confirm a pending record is created in `.takt/tasks.yaml`.
231
- 2. Open the generated `.takt/tasks/{slug}/order.md` and add detailed specifications/references as needed.
232
- 3. Run `takt run` (or `takt watch`) to execute pending tasks from `tasks.yaml`.
233
- 4. Verify outputs in `.takt/runs/{slug}/reports/` using the same slug as `task_dir`.
234
-
235
- ### Pipeline Mode (for CI/Automation)
236
-
237
- Specifying `--pipeline` enables non-interactive pipeline mode. Automatically creates branch → runs piece → commits & pushes. Suitable for CI/CD automation.
238
-
239
- ```bash
240
- # Execute task in pipeline mode
241
- takt --pipeline --task "Fix bug"
242
-
243
- # Pipeline execution + auto-create PR
244
- takt --pipeline --task "Fix bug" --auto-pr
245
-
246
- # Link issue information
247
- takt --pipeline --issue 99 --auto-pr
248
-
249
- # Specify piece and branch
250
- takt --pipeline --task "Fix bug" -w magi -b feat/fix-bug
251
-
252
- # Specify repository (for PR creation)
253
- takt --pipeline --task "Fix bug" --auto-pr --repo owner/repo
254
-
255
- # Piece execution only (skip branch creation, commit, push)
256
- takt --pipeline --task "Fix bug" --skip-git
257
-
258
- # Minimal output mode (for CI)
259
- takt --pipeline --task "Fix bug" --quiet
260
- ```
86
+ TAKT uses a music metaphor: **piece** = workflow, **movement** = step.
261
87
 
262
- In pipeline mode, PRs are not created unless `--auto-pr` is specified.
263
-
264
- **GitHub Integration:** When using TAKT in GitHub Actions, see [takt-action](https://github.com/nrslib/takt-action). You can automate PR reviews and task execution. Refer to the [CI/CD Integration](#cicd-integration) section for details.
265
-
266
- ### Other Commands
267
-
268
- ```bash
269
- # Interactively switch pieces
270
- takt switch
271
-
272
- # Copy builtin pieces/personas to project .takt/ for customization
273
- takt eject
274
-
275
- # Copy to ~/.takt/ (global) instead
276
- takt eject --global
277
-
278
- # Clear agent conversation sessions
279
- takt clear
280
-
281
- # Deploy builtin pieces/personas as Claude Code Skill
282
- takt export-cc
283
-
284
- # List available facets across layers
285
- takt catalog
286
- takt catalog personas
287
-
288
- # Eject a specific facet for customization
289
- takt eject persona coder
290
- takt eject instruction plan --global
291
-
292
- # Preview assembled prompts for each movement and phase
293
- takt prompt [piece]
294
-
295
- # Configure permission mode
296
- takt config
297
-
298
- # Reset piece categories to builtin defaults
299
- takt reset categories
300
- ```
301
-
302
- ### Recommended Pieces
303
-
304
- | Piece | Recommended Use |
305
- |----------|-----------------|
306
- | `default` | Serious development tasks. Used for TAKT's own development. Multi-stage review with parallel reviews (architect + security). |
307
- | `default-mini` | Simple fixes and straightforward tasks. Lightweight piece with AI antipattern review + supervisor. |
308
- | `review-fix-minimal` | Review & fix piece. Specialized for iterative improvement based on review feedback. |
309
- | `research` | Investigation and research. Autonomously executes research without asking questions. |
310
-
311
- ### Main Options
312
-
313
- | Option | Description |
314
- |--------|-------------|
315
- | `--pipeline` | **Enable pipeline (non-interactive) mode** — Required for CI/automation |
316
- | `-t, --task <text>` | Task content (alternative to GitHub Issue) |
317
- | `-i, --issue <N>` | GitHub issue number (same as `#N` in interactive mode) |
318
- | `-w, --piece <name or path>` | Piece name or path to piece YAML file |
319
- | `-b, --branch <name>` | Specify branch name (auto-generated if omitted) |
320
- | `--auto-pr` | Create PR (interactive: skip confirmation, pipeline: enable PR) |
321
- | `--skip-git` | Skip branch creation, commit, and push (pipeline mode, piece-only) |
322
- | `--repo <owner/repo>` | Specify repository (for PR creation) |
323
- | `--create-worktree <yes\|no>` | Skip worktree confirmation prompt |
324
- | `-q, --quiet` | Minimal output mode: suppress AI output (for CI) |
325
- | `--provider <name>` | Override agent provider (claude\|codex\|opencode\|mock) |
326
- | `--model <name>` | Override agent model |
327
-
328
- ## Pieces
329
-
330
- TAKT uses YAML-based piece definitions and rule-based routing. Builtin pieces are embedded in the package, with user pieces in `~/.takt/pieces/` taking priority. Use `takt eject` to copy builtins to `~/.takt/` for customization.
331
-
332
- > **Note (v0.4.0)**: Internal terminology has changed from "step" to "movement" for piece components. User-facing piece files remain compatible, but if you customize pieces, you may see `movements:` instead of `steps:` in YAML files. The functionality remains the same.
333
-
334
- ### Piece Example
88
+ A piece defines a sequence of movements. Each movement specifies a persona (who), permissions (what's allowed), and rules (what happens next). Here's a minimal example:
335
89
 
336
90
  ```yaml
337
- name: default
338
- max_movements: 10
91
+ name: simple
339
92
  initial_movement: plan
340
93
 
341
- # Section maps — key: file path (relative to this YAML)
342
94
  personas:
343
95
  planner: ../personas/planner.md
344
96
  coder: ../personas/coder.md
345
97
  reviewer: ../personas/architecture-reviewer.md
346
98
 
347
- policies:
348
- coding: ../policies/coding.md
349
-
350
- knowledge:
351
- architecture: ../knowledge/architecture.md
352
-
353
99
  movements:
354
100
  - name: plan
355
101
  persona: planner
356
- model: opus
357
102
  edit: false
358
103
  rules:
359
104
  - condition: Planning complete
360
105
  next: implement
361
- instruction_template: |
362
- Analyze the request and create an implementation plan.
363
106
 
364
107
  - name: implement
365
108
  persona: coder
366
- policy: coding
367
- knowledge: architecture
368
109
  edit: true
369
- required_permission_mode: edit
370
110
  rules:
371
111
  - condition: Implementation complete
372
112
  next: review
373
- - condition: Blocked
374
- next: ABORT
375
- instruction_template: |
376
- Implement based on the plan.
377
113
 
378
114
  - name: review
379
115
  persona: reviewer
380
- knowledge: architecture
381
116
  edit: false
382
117
  rules:
383
118
  - condition: Approved
384
119
  next: COMPLETE
385
120
  - condition: Needs fix
386
- next: implement
387
- instruction_template: |
388
- Review the implementation from architecture and code quality perspectives.
389
- ```
390
-
391
- ### Persona-less Movements
392
-
393
- The `persona` field is optional. When omitted, the movement executes using only the `instruction_template` without a system prompt. This is useful for simple tasks that don't require persona customization.
394
-
395
- ```yaml
396
- - name: summarize
397
- # No persona specified — uses instruction_template only
398
- edit: false
399
- rules:
400
- - condition: Summary complete
401
- next: COMPLETE
402
- instruction_template: |
403
- Read the report and provide a concise summary.
404
- ```
405
-
406
- You can also write an inline system prompt as the `persona` value (if the specified file doesn't exist):
407
-
408
- ```yaml
409
- - name: review
410
- persona: "You are a code reviewer. Focus on readability and maintainability."
411
- edit: false
412
- instruction_template: |
413
- Review code quality.
414
- ```
415
-
416
- ### Parallel Movements
417
-
418
- Execute sub-movements in parallel within a movement and evaluate with aggregate conditions:
419
-
420
- ```yaml
421
- - name: reviewers
422
- parallel:
423
- - name: arch-review
424
- persona: reviewer
425
- rules:
426
- - condition: approved
427
- - condition: needs_fix
428
- instruction_template: |
429
- Review architecture and code quality.
430
- - name: security-review
431
- persona: security-reviewer
432
- rules:
433
- - condition: approved
434
- - condition: needs_fix
435
- instruction_template: |
436
- Review for security vulnerabilities.
437
- rules:
438
- - condition: all("approved")
439
- next: supervise
440
- - condition: any("needs_fix")
441
- next: fix
121
+ next: implement # ← fix loop
442
122
  ```
443
123
 
444
- - `all("X")`: true if ALL sub-movements matched condition X
445
- - `any("X")`: true if ANY sub-movement matched condition X
446
- - Sub-movement `rules` define possible outcomes, but `next` is optional (parent controls transition)
124
+ Rules determine the next movement. `COMPLETE` ends the piece successfully, `ABORT` ends with failure. See the [Piece Guide](./docs/pieces.md) for the full schema, parallel movements, and rule condition types.
447
125
 
448
- ### Rule Condition Types
126
+ ## Recommended Pieces
449
127
 
450
- | Type | Syntax | Description |
451
- |------|--------|-------------|
452
- | Tag-based | `"condition text"` | Agent outputs `[MOVEMENTNAME:N]` tag, matched by index |
453
- | AI judge | `ai("condition text")` | AI evaluates condition against agent output |
454
- | Aggregate | `all("X")` / `any("X")` | Aggregates parallel sub-movement matched conditions |
128
+ | Piece | Use Case |
129
+ |-------|----------|
130
+ | `default-mini` | Quick fixes. Lightweight plan implement parallel review fix loop. |
131
+ | `frontend-mini` | Frontend-focused mini configuration. |
132
+ | `backend-mini` | Backend-focused mini configuration. |
133
+ | `expert-mini` | Expert-level mini configuration. |
134
+ | `default` | Serious development. Multi-stage review with parallel reviewers. Used for TAKT's own development. |
455
135
 
456
- ## Builtin Pieces
136
+ See the [Builtin Catalog](./docs/builtin-catalog.md) for all pieces and personas.
457
137
 
458
- TAKT includes multiple builtin pieces:
138
+ ## Key Commands
459
139
 
460
- | Piece | Description |
461
- |----------|-------------|
462
- | `default` | Full development piece: plan → implement → AI review → parallel review (architect + QA) → supervisor approval. Includes fix loops at each review stage. |
463
- | `default-mini` | Mini development piece: plan → implement → parallel review (AI antipattern + supervisor) → fix if needed. Lightweight with review. |
464
- | `frontend-mini` | Mini frontend piece: plan → implement → parallel review (AI antipattern + supervisor) with frontend knowledge injection. |
465
- | `backend-mini` | Mini backend piece: plan → implement → parallel review (AI antipattern + supervisor) with backend knowledge injection. |
466
- | `backend-cqrs-mini` | Mini CQRS+ES piece: plan → implement → parallel review (AI antipattern + supervisor) with CQRS+ES knowledge injection. |
467
- | `review-fix-minimal` | Review-focused piece: review → fix → supervisor. For iterative improvement based on review feedback. |
468
- | `research` | Research piece: planner → digger → supervisor. Autonomously executes research without asking questions. |
469
- | `deep-research` | Deep research piece: plan → dig → analyze → supervise. Discovery-driven investigation that follows emerging questions with multi-perspective analysis. |
470
- | `expert` | Full-stack development piece: architecture, frontend, security, QA reviews with fix loops. |
471
- | `expert-mini` | Mini expert piece: plan → implement → parallel review (AI antipattern + expert supervisor) with full-stack knowledge injection. |
472
- | `expert-cqrs` | Full-stack development piece (CQRS+ES specialized): CQRS+ES, frontend, security, QA reviews with fix loops. |
473
- | `expert-cqrs-mini` | Mini CQRS+ES expert piece: plan → implement → parallel review (AI antipattern + expert supervisor) with CQRS+ES knowledge injection. |
474
- | `magi` | Deliberation system inspired by Evangelion. Three AI personas (MELCHIOR, BALTHASAR, CASPER) analyze and vote. |
475
- | `passthrough` | Thinnest wrapper. Pass task directly to coder as-is. No review. |
476
- | `compound-eye` | Multi-model review: sends the same instruction to Claude and Codex simultaneously, then synthesizes both responses. |
477
- | `review-only` | Read-only code review piece that makes no changes. |
478
- | `structural-reform` | Full project review and structural reform: iterative codebase restructuring with staged file splits. |
479
- | `unit-test` | Unit test focused piece: test analysis → test implementation → review → fix. |
480
- | `e2e-test` | E2E test focused piece: E2E analysis → E2E implementation → review → fix (Vitest-based E2E flow). |
481
- | `frontend` | Frontend-specialized development piece with React/Next.js focused reviews and knowledge injection. |
482
- | `backend` | Backend-specialized development piece with backend, security, and QA expert reviews. |
483
- | `backend-cqrs` | CQRS+ES-specialized backend development piece with CQRS+ES, security, and QA expert reviews. |
484
-
485
- **Per-persona provider overrides:** Use `persona_providers` in config to route specific personas to different providers (e.g., coder on Codex, reviewers on Claude) without duplicating pieces.
486
-
487
- Use `takt switch` to switch pieces.
488
-
489
- ## Builtin Personas
490
-
491
- | Persona | Description |
140
+ | Command | Description |
492
141
  |---------|-------------|
493
- | **planner** | Task analysis, spec investigation, implementation planning |
494
- | **architect-planner** | Task analysis and design planning: investigates code, resolves unknowns, creates implementation plans |
495
- | **coder** | Feature implementation, bug fixing |
496
- | **ai-antipattern-reviewer** | AI-specific antipattern review (non-existent APIs, incorrect assumptions, scope creep) |
497
- | **architecture-reviewer** | Architecture and code quality review, spec compliance verification |
498
- | **frontend-reviewer** | Frontend (React/Next.js) code quality and best practices review |
499
- | **cqrs-es-reviewer** | CQRS+Event Sourcing architecture and implementation review |
500
- | **qa-reviewer** | Test coverage and quality assurance review |
501
- | **security-reviewer** | Security vulnerability assessment |
502
- | **conductor** | Phase 3 judgment specialist: reads reports/responses and outputs status tags |
503
- | **supervisor** | Final validation, approval |
504
- | **expert-supervisor** | Expert-level final validation with comprehensive review integration |
505
- | **research-planner** | Research task planning and scope definition |
506
- | **research-analyzer** | Research result interpretation and additional investigation planning |
507
- | **research-digger** | Deep investigation and information gathering |
508
- | **research-supervisor** | Research quality validation and completeness assessment |
509
- | **test-planner** | Test strategy analysis and comprehensive test planning |
510
- | **pr-commenter** | Posts review findings as GitHub PR comments |
511
-
512
- ## Custom Personas
513
-
514
- Create persona prompts in Markdown files:
142
+ | `takt` | Talk to AI, refine requirements, execute or queue tasks |
143
+ | `takt run` | Execute all pending tasks |
144
+ | `takt list` | Manage task branches (merge, retry, instruct, delete) |
145
+ | `takt #N` | Execute GitHub Issue as task |
146
+ | `takt switch` | Switch active piece |
147
+ | `takt eject` | Copy builtin pieces/personas for customization |
515
148
 
516
- ```markdown
517
- # ~/.takt/personas/my-reviewer.md
149
+ See the [CLI Reference](./docs/cli-reference.md) for all commands and options.
518
150
 
519
- You are a code reviewer specialized in security.
151
+ ## Configuration
520
152
 
521
- ## Role
522
- - Check for security vulnerabilities
523
- - Verify input validation
524
- - Review authentication logic
525
- ```
526
-
527
- ## Model Selection
528
-
529
- The `model` field (in piece movements, agent config, or global config) is passed directly to the provider (Claude Code CLI / Codex SDK). TAKT does not resolve model aliases.
530
-
531
- ### Claude Code
532
-
533
- Claude Code supports aliases (`opus`, `sonnet`, `haiku`, `opusplan`, `default`) and full model names (e.g., `claude-sonnet-4-5-20250929`). Refer to the [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code) for available models.
534
-
535
- ### Codex
536
-
537
- The model string is passed to the Codex SDK. If unspecified, defaults to `codex`. Refer to Codex documentation for available models.
538
-
539
- ## Project Structure
540
-
541
- ```
542
- ~/.takt/ # Global configuration directory
543
- ├── config.yaml # Global config (provider, model, piece, etc.)
544
- ├── pieces/ # User piece definitions (override builtins)
545
- │ └── custom.yaml
546
- └── personas/ # User persona prompt files (.md)
547
- └── my-persona.md
548
-
549
- .takt/ # Project-level configuration
550
- ├── config.yaml # Project config (current piece, etc.)
551
- ├── tasks/ # Task input directories (.takt/tasks/{slug}/order.md, etc.)
552
- ├── tasks.yaml # Pending tasks metadata (task_dir, piece, worktree, etc.)
553
- └── runs/ # Run-scoped artifacts
554
- └── {slug}/
555
- ├── reports/ # Execution reports (auto-generated)
556
- ├── context/ # knowledge/policy/previous_response snapshots
557
- ├── logs/ # NDJSON session logs for this run
558
- └── meta.json # Run metadata
559
- ```
560
-
561
- Builtin resources are embedded in the npm package (`builtins/`). User files in `~/.takt/` take priority.
562
-
563
- ### Global Configuration
564
-
565
- Configure default provider and model in `~/.takt/config.yaml`:
153
+ Minimal `~/.takt/config.yaml`:
566
154
 
567
155
  ```yaml
568
- # ~/.takt/config.yaml
569
- language: en
570
- default_piece: default
571
- log_level: info
572
- provider: claude # Default provider: claude, codex, or opencode
573
- model: sonnet # Default model (optional)
574
- branch_name_strategy: romaji # Branch name generation: 'romaji' (fast) or 'ai' (slow)
575
- prevent_sleep: false # Prevent macOS idle sleep during execution (caffeinate)
576
- notification_sound: true # Enable/disable notification sounds
577
- notification_sound_events: # Optional per-event toggles
578
- iteration_limit: false
579
- piece_complete: true
580
- piece_abort: true
581
- run_complete: true # Enabled by default; set false to disable
582
- run_abort: true # Enabled by default; set false to disable
583
- concurrency: 1 # Parallel task count for takt run (1-10, default: 1 = sequential)
584
- task_poll_interval_ms: 500 # Polling interval for new tasks during takt run (100-5000, default: 500)
585
- interactive_preview_movements: 3 # Movement previews in interactive mode (0-10, default: 3)
586
-
587
- # Runtime environment defaults (applies to all pieces unless piece_config.runtime overrides)
588
- # runtime:
589
- # prepare:
590
- # - gradle # Prepare Gradle cache/config in .runtime/
591
- # - node # Prepare npm cache in .runtime/
592
-
593
- # Per-persona provider overrides (optional)
594
- # Route specific personas to different providers without duplicating pieces
595
- # persona_providers:
596
- # coder: codex # Run coder on Codex
597
- # ai-antipattern-reviewer: claude # Keep reviewers on Claude
598
-
599
- # Provider-specific permission profiles (optional)
600
- # Priority: project override → global override → project default → global default → required_permission_mode (floor)
601
- # provider_profiles:
602
- # codex:
603
- # default_permission_mode: full
604
- # movement_permission_overrides:
605
- # ai_review: readonly
606
- # claude:
607
- # default_permission_mode: edit
608
-
609
- # API Key configuration (optional)
610
- # Can be overridden by environment variables TAKT_ANTHROPIC_API_KEY / TAKT_OPENAI_API_KEY / TAKT_OPENCODE_API_KEY
611
- anthropic_api_key: sk-ant-... # For Claude (Anthropic)
612
- # openai_api_key: sk-... # For Codex (OpenAI)
613
- # opencode_api_key: ... # For OpenCode
614
-
615
- # Codex CLI path override (optional)
616
- # Override the Codex CLI binary used by the Codex SDK (must be an absolute path to an executable file)
617
- # Can be overridden by TAKT_CODEX_CLI_PATH environment variable
618
- # codex_cli_path: /usr/local/bin/codex
619
-
620
- # Builtin piece filtering (optional)
621
- # builtin_pieces_enabled: true # Set false to disable all builtins
622
- # disabled_builtins: [magi, passthrough] # Disable specific builtin pieces
623
-
624
- # Pipeline execution configuration (optional)
625
- # Customize branch names, commit messages, and PR body.
626
- # pipeline:
627
- # default_branch_prefix: "takt/"
628
- # commit_message_template: "feat: {title} (#{issue})"
629
- # pr_body_template: |
630
- # ## Summary
631
- # {issue_body}
632
- # Closes #{issue}
156
+ provider: claude # claude, codex, or opencode
157
+ model: sonnet # passed directly to provider
158
+ language: en # en or ja
633
159
  ```
634
160
 
635
- **Note:** The Codex SDK requires running inside a Git repository. `--skip-git-repo-check` is only available in the Codex CLI.
636
-
637
- **API Key Configuration Methods:**
638
-
639
- 1. **Set via environment variables**:
640
- ```bash
641
- export TAKT_ANTHROPIC_API_KEY=sk-ant-... # For Claude
642
- export TAKT_OPENAI_API_KEY=sk-... # For Codex
643
- export TAKT_OPENCODE_API_KEY=... # For OpenCode
644
- ```
645
-
646
- 2. **Set in config file**:
647
- Write `anthropic_api_key`, `openai_api_key`, or `opencode_api_key` in `~/.takt/config.yaml` as shown above
648
-
649
- Priority: Environment variables > `config.yaml` settings
650
-
651
- **Notes:**
652
- - If you set an API Key, installing Claude Code, Codex, or OpenCode is not necessary. TAKT directly calls the respective API.
653
- - **Security**: If you write API Keys in `config.yaml`, be careful not to commit this file to Git. Consider using environment variables or adding `~/.takt/config.yaml` to `.gitignore`.
654
-
655
- **Pipeline Template Variables:**
656
-
657
- | Variable | Available In | Description |
658
- |----------|-------------|-------------|
659
- | `{title}` | Commit message | Issue title |
660
- | `{issue}` | Commit message, PR body | Issue number |
661
- | `{issue_body}` | PR body | Issue body |
662
- | `{report}` | PR body | Piece execution report |
663
-
664
- **Model Resolution Priority:**
665
- 1. Piece movement `model` (highest priority)
666
- 2. Custom agent `model`
667
- 3. Global config `model`
668
- 4. Provider default (Claude: sonnet, Codex: codex, OpenCode: provider default)
669
-
670
- ## Detailed Guides
671
-
672
- ### Task Directory Format
673
-
674
- TAKT stores task metadata in `.takt/tasks.yaml`, and each task's long specification in `.takt/tasks/{slug}/`.
675
-
676
- **Recommended layout**:
677
-
678
- ```text
679
- .takt/
680
- tasks/
681
- 20260201-015714-foptng/
682
- order.md
683
- schema.sql
684
- wireframe.png
685
- tasks.yaml
686
- runs/
687
- 20260201-015714-foptng/
688
- reports/
689
- ```
690
-
691
- **tasks.yaml record**:
692
-
693
- ```yaml
694
- tasks:
695
- - name: add-auth-feature
696
- status: pending
697
- task_dir: .takt/tasks/20260201-015714-foptng
698
- piece: default
699
- created_at: "2026-02-01T01:57:14.000Z"
700
- started_at: null
701
- completed_at: null
702
- ```
703
-
704
- `takt add` creates `.takt/tasks/{slug}/order.md` automatically and saves `task_dir` to `tasks.yaml`.
705
-
706
- #### Isolated Execution with Shared Clone
707
-
708
- Specifying `worktree` in YAML task files executes each task in an isolated clone created with `git clone --shared`, keeping your main working directory clean:
709
-
710
- - `worktree: true` - Auto-create shared clone in adjacent directory (or location specified by `worktree_dir` config)
711
- - `worktree: "/path/to/dir"` - Create at specified path
712
- - `branch: "feat/xxx"` - Use specified branch (auto-generated as `takt/{timestamp}-{slug}` if omitted)
713
- - Omit `worktree` - Execute in current directory (default)
714
-
715
- > **Note**: The YAML field name remains `worktree` for backward compatibility. Internally, it uses `git clone --shared` instead of `git worktree`. Git worktrees have a `.git` file containing `gitdir:` pointing to the main repository, which Claude Code follows to recognize the main repository as the project root. Shared clones have an independent `.git` directory, preventing this issue.
716
-
717
- Clones are ephemeral. After task completion, they auto-commit + push, then delete the clone. Branches are the only persistent artifacts. Use `takt list` to list, merge, or delete branches.
718
-
719
- ### Session Logs
720
-
721
- TAKT writes session logs in NDJSON (`.jsonl`) format to `.takt/runs/{slug}/logs/`. Each record is atomically appended, so partial logs are preserved even if the process crashes, and you can track in real-time with `tail -f`.
722
-
723
- - `.takt/runs/{slug}/logs/{sessionId}.jsonl` - NDJSON session log per piece execution
724
- - `.takt/runs/{slug}/meta.json` - Run metadata (`task`, `piece`, `start/end`, `status`, etc.)
725
-
726
- Record types: `piece_start`, `step_start`, `step_complete`, `piece_complete`, `piece_abort`
727
-
728
- The latest previous response is stored at `.takt/runs/{slug}/context/previous_responses/latest.md` and inherited automatically.
729
-
730
- ### Adding Custom Pieces
731
-
732
- Add YAML files to `~/.takt/pieces/` or customize builtins with `takt eject`:
161
+ Or use API keys directly (no CLI installation required):
733
162
 
734
163
  ```bash
735
- # Copy default piece to ~/.takt/pieces/ and edit
736
- takt eject default
164
+ export TAKT_ANTHROPIC_API_KEY=sk-ant-...
737
165
  ```
738
166
 
739
- ```yaml
740
- # ~/.takt/pieces/my-piece.yaml
741
- name: my-piece
742
- description: Custom piece
743
- max_movements: 5
744
- initial_movement: analyze
167
+ See the [Configuration Guide](./docs/configuration.md) for all options, provider profiles, and model resolution.
745
168
 
746
- personas:
747
- analyzer: ~/.takt/personas/analyzer.md
748
- coder: ../personas/coder.md
169
+ ## Customization
749
170
 
750
- movements:
751
- - name: analyze
752
- persona: analyzer
753
- edit: false
754
- rules:
755
- - condition: Analysis complete
756
- next: implement
757
- instruction_template: |
758
- Thoroughly analyze this request.
171
+ ### Custom pieces
759
172
 
760
- - name: implement
761
- persona: coder
762
- edit: true
763
- required_permission_mode: edit
764
- pass_previous_response: true
765
- rules:
766
- - condition: Complete
767
- next: COMPLETE
768
- instruction_template: |
769
- Implement based on the analysis.
173
+ ```bash
174
+ takt eject default # Copy builtin to ~/.takt/pieces/ and edit
770
175
  ```
771
176
 
772
- > **Note**: `{task}`, `{previous_response}`, `{user_inputs}` are automatically injected into instructions. Explicit placeholders are only needed if you want to control their position in the template.
177
+ ### Custom personas
773
178
 
774
- ### Specifying Personas by Path
179
+ Create a Markdown file in `~/.takt/personas/`:
775
180
 
776
- Map keys to file paths in section maps, then reference keys from movements:
777
-
778
- ```yaml
779
- # Section maps (relative to piece file)
780
- personas:
781
- coder: ../personas/coder.md
782
- reviewer: ~/.takt/personas/my-reviewer.md
181
+ ```markdown
182
+ # ~/.takt/personas/my-reviewer.md
183
+ You are a code reviewer specialized in security.
783
184
  ```
784
185
 
785
- ### Piece Variables
186
+ Reference it in your piece: `persona: my-reviewer`
786
187
 
787
- Variables available in `instruction_template`:
788
-
789
- | Variable | Description |
790
- |----------|-------------|
791
- | `{task}` | Original user request (auto-injected if not in template) |
792
- | `{iteration}` | Piece-wide turn count (total steps executed) |
793
- | `{max_movements}` | Maximum iteration count |
794
- | `{movement_iteration}` | Per-movement iteration count (times this movement has been executed) |
795
- | `{previous_response}` | Output from previous movement (auto-injected if not in template) |
796
- | `{user_inputs}` | Additional user inputs during piece (auto-injected if not in template) |
797
- | `{report_dir}` | Report directory path (e.g., `.takt/runs/20250126-143052-task-summary/reports`) |
798
- | `{report:filename}` | Expands to `{report_dir}/filename` (e.g., `{report:00-plan.md}`) |
188
+ See the [Piece Guide](./docs/pieces.md) and [Agent Guide](./docs/agents.md) for details.
799
189
 
800
- ### Piece Design
190
+ ## CI/CD
801
191
 
802
- Elements needed for each piece movement:
803
-
804
- **1. Persona** - Referenced by section map key (used as system prompt):
192
+ TAKT provides [takt-action](https://github.com/nrslib/takt-action) for GitHub Actions:
805
193
 
806
194
  ```yaml
807
- persona: coder # Key from personas section map
808
- persona_name: coder # Display name (optional)
195
+ - uses: nrslib/takt-action@main
196
+ with:
197
+ anthropic_api_key: ${{ secrets.TAKT_ANTHROPIC_API_KEY }}
198
+ github_token: ${{ secrets.GITHUB_TOKEN }}
809
199
  ```
810
200
 
811
- **2. Rules** - Define routing from movement to next movement. The instruction builder auto-injects status output rules, so agents know which tags to output:
201
+ For other CI systems, use pipeline mode:
812
202
 
813
- ```yaml
814
- rules:
815
- - condition: "Implementation complete"
816
- next: review
817
- - condition: "Blocked"
818
- next: ABORT
203
+ ```bash
204
+ takt --pipeline --task "Fix the bug" --auto-pr
819
205
  ```
820
206
 
821
- Special `next` values: `COMPLETE` (success), `ABORT` (failure)
822
-
823
- **3. Movement Options:**
207
+ See the [CI/CD Guide](./docs/ci-cd.md) for full setup instructions.
824
208
 
825
- | Option | Default | Description |
826
- |--------|---------|-------------|
827
- | `edit` | - | Whether movement can edit project files (`true`/`false`) |
828
- | `pass_previous_response` | `true` | Pass previous movement output to `{previous_response}` |
829
- | `allowed_tools` | - | List of tools agent can use (Read, Glob, Grep, Edit, Write, Bash, etc.) |
830
- | `provider` | - | Override provider for this movement (`claude`, `codex`, or `opencode`) |
831
- | `model` | - | Override model for this movement |
832
- | `required_permission_mode` | - | Required minimum permission mode: `readonly`, `edit`, `full` (acts as floor; actual mode resolved via `provider_profiles`) |
833
- | `provider_options` | - | Provider-specific options (e.g. `codex.network_access`, `opencode.network_access`) |
834
- | `output_contracts` | - | Output contract definitions for report files |
835
- | `quality_gates` | - | AI directives for movement completion requirements |
836
- | `mcp_servers` | - | MCP (Model Context Protocol) server configuration (stdio/SSE/HTTP) |
837
-
838
- Piece-level defaults can be set with `piece_config.provider_options`, and movement-level `provider_options` overrides them.
209
+ ## Project Structure
839
210
 
840
- ```yaml
841
- piece_config:
842
- provider_options:
843
- codex:
844
- network_access: true
845
- opencode:
846
- network_access: true
847
- runtime:
848
- prepare:
849
- - gradle
850
- - node
851
211
  ```
212
+ ~/.takt/ # Global config
213
+ ├── config.yaml # Provider, model, language, etc.
214
+ ├── pieces/ # User piece definitions
215
+ └── personas/ # User persona prompts
852
216
 
853
- Runtime `prepare` entries can be builtin presets (`gradle`, `node`) or paths to custom shell scripts. Scripts receive `TAKT_RUNTIME_ROOT` and related env vars, and can export additional variables via stdout.
217
+ .takt/ # Project-level
218
+ ├── config.yaml # Project config
219
+ ├── tasks.yaml # Pending tasks
220
+ ├── tasks/ # Task specifications
221
+ └── runs/ # Execution reports, logs, context
222
+ ```
854
223
 
855
- ## API Usage Example
224
+ ## API Usage
856
225
 
857
226
  ```typescript
858
- import { PieceEngine, loadPiece } from 'takt'; // npm install takt
227
+ import { PieceEngine, loadPiece } from 'takt';
859
228
 
860
229
  const config = loadPiece('default');
861
- if (!config) {
862
- throw new Error('Piece not found');
863
- }
864
- const engine = new PieceEngine(config, process.cwd(), 'My task');
230
+ if (!config) throw new Error('Piece not found');
865
231
 
232
+ const engine = new PieceEngine(config, process.cwd(), 'My task');
866
233
  engine.on('step:complete', (step, response) => {
867
234
  console.log(`${step.name}: ${response.status}`);
868
235
  });
@@ -870,81 +237,25 @@ engine.on('step:complete', (step, response) => {
870
237
  await engine.run();
871
238
  ```
872
239
 
873
- ## Contributing
874
-
875
- See [CONTRIBUTING.md](../CONTRIBUTING.md) for details.
876
-
877
- ## CI/CD Integration
878
-
879
- ### GitHub Actions
880
-
881
- TAKT provides a GitHub Action for automating PR reviews and task execution. See [takt-action](https://github.com/nrslib/takt-action) for details.
882
-
883
- **Piece example** (see [.github/workflows/takt-action.yml](../.github/workflows/takt-action.yml) in this repository):
884
-
885
- ```yaml
886
- name: TAKT
887
-
888
- on:
889
- issue_comment:
890
- types: [created]
891
-
892
- jobs:
893
- takt:
894
- if: contains(github.event.comment.body, '@takt')
895
- runs-on: ubuntu-latest
896
- permissions:
897
- contents: write
898
- issues: write
899
- pull-requests: write
900
-
901
- steps:
902
- - name: Checkout
903
- uses: actions/checkout@v4
904
-
905
- - name: Run TAKT
906
- uses: nrslib/takt-action@main
907
- with:
908
- anthropic_api_key: ${{ secrets.TAKT_ANTHROPIC_API_KEY }}
909
- github_token: ${{ secrets.GITHUB_TOKEN }}
910
- ```
911
-
912
- **Cost Warning**: TAKT uses AI APIs (Claude or OpenAI), which can incur significant costs, especially when tasks are auto-executed in CI/CD environments. Monitor API usage and set up billing alerts.
913
-
914
- ### Other CI Systems
915
-
916
- For CI systems other than GitHub, use pipeline mode:
917
-
918
- ```bash
919
- # Install takt
920
- npm install -g takt
921
-
922
- # Run in pipeline mode
923
- takt --pipeline --task "Fix bug" --auto-pr --repo owner/repo
924
- ```
925
-
926
- For authentication, set `TAKT_ANTHROPIC_API_KEY`, `TAKT_OPENAI_API_KEY`, or `TAKT_OPENCODE_API_KEY` environment variables (TAKT-specific prefix).
927
-
928
- ```bash
929
- # For Claude (Anthropic)
930
- export TAKT_ANTHROPIC_API_KEY=sk-ant-...
931
-
932
- # For Codex (OpenAI)
933
- export TAKT_OPENAI_API_KEY=sk-...
240
+ ## Documentation
934
241
 
935
- # For OpenCode
936
- export TAKT_OPENCODE_API_KEY=...
937
- ```
242
+ | Document | Description |
243
+ |----------|-------------|
244
+ | [CLI Reference](./docs/cli-reference.md) | All commands and options |
245
+ | [Configuration](./docs/configuration.md) | Global and project settings |
246
+ | [Piece Guide](./docs/pieces.md) | Creating and customizing pieces |
247
+ | [Agent Guide](./docs/agents.md) | Custom agent configuration |
248
+ | [Builtin Catalog](./docs/builtin-catalog.md) | All builtin pieces and personas |
249
+ | [Faceted Prompting](./docs/faceted-prompting.md) | Prompt design methodology |
250
+ | [Task Management](./docs/task-management.md) | Task queuing, execution, isolation |
251
+ | [CI/CD Integration](./docs/ci-cd.md) | GitHub Actions and pipeline mode |
252
+ | [Changelog](./CHANGELOG.md) ([日本語](./docs/CHANGELOG.ja.md)) | Version history |
253
+ | [Security Policy](./SECURITY.md) | Vulnerability reporting |
938
254
 
939
- ## Documentation
255
+ ## Contributing
940
256
 
941
- - [Faceted Prompting](./docs/faceted-prompting.md) - Separation of Concerns for AI prompts (Persona, Policy, Instruction, Knowledge, Output Contract)
942
- - [Piece Guide](./docs/pieces.md) - Creating and customizing pieces
943
- - [Agent Guide](./docs/agents.md) - Configuring custom agents
944
- - [Changelog](../CHANGELOG.md) ([日本語](./docs/CHANGELOG.ja.md)) - Version history
945
- - [Security Policy](../SECURITY.md) - Vulnerability reporting
946
- - [Blog: TAKT - AI Agent Orchestration](https://zenn.dev/nrs/articles/c6842288a526d7) - Design philosophy and practical usage guide (Japanese)
257
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
947
258
 
948
259
  ## License
949
260
 
950
- MIT - See [LICENSE](../LICENSE) for details.
261
+ MIT See [LICENSE](./LICENSE) for details.